Adds Browsh version to HTML output

This commit is contained in:
Thomas Buckley-Houston 2018-07-19 13:36:53 +08:00
parent 9318cbf282
commit 8851ded7ea
2 changed files with 3 additions and 2 deletions

View file

@ -48,6 +48,7 @@ export default MixinBase =>
_loadConfig(json_string) { _loadConfig(json_string) {
this.log(json_string); this.log(json_string);
this.config = JSON.parse(json_string); this.config = JSON.parse(json_string);
this.config.browsh_version = browser.runtime.getManifest().version;
if (this.currentTab()) { if (this.currentTab()) {
this.currentTab().sendGlobalConfig(this.config); this.currentTab().sendGlobalConfig(this.config);
} }

View file

@ -54,7 +54,6 @@ export default MixinBase =>
// Whether a use has shown support. This controls certain Browsh branding and // Whether a use has shown support. This controls certain Browsh branding and
// nags to donate. // nags to donate.
userHasShownSupport() { userHasShownSupport() {
this.log(this.config.browsh_supporter);
return ( return (
this.config.browsh_supporter === "I have shown my support for Browsh" this.config.browsh_supporter === "I have shown my support for Browsh"
); );
@ -64,7 +63,8 @@ export default MixinBase =>
if (this.userHasShownSupport()) { if (this.userHasShownSupport()) {
return ""; return "";
} }
return 'by <a href="https://www.brow.sh">Browsh</a> '; return 'by <a href="https://www.brow.sh">Browsh</a> v' +
this.config.browsh_version + ' ';
} }
_getUserFooter() { _getUserFooter() {