JS and Go formatting

This commit is contained in:
Thomas Buckley-Houston 2018-07-19 14:07:39 +08:00
parent 20c7cb607f
commit a9425988af
2 changed files with 21 additions and 15 deletions

View file

@ -38,7 +38,7 @@ var (
// IsTesting is used in tests, so it needs to be exported // IsTesting is used in tests, so it needs to be exported
IsTesting = false IsTesting = false
logfile string logfile string
_ = pflag.Bool("version", false, "Output current Browsh version") _ = pflag.Bool("version", false, "Output current Browsh version")
) )
func setupLogging() { func setupLogging() {

View file

@ -64,14 +64,15 @@ export default MixinBase =>
_byBrowsh() { _byBrowsh() {
let by; let by;
if (this.userHasShownSupport()) { return ''} if (this.userHasShownSupport()) {
if (this._raw_mode_type === "raw_text_html") { return "";
by = 'by <a href="https://www.brow.sh">Browsh</a> v'
} else {
by = 'by Browsh v'
} }
return by + if (this._raw_mode_type === "raw_text_html") {
this.config.browsh_version + ' '; by = 'by <a href="https://www.brow.sh">Browsh</a> v';
} else {
by = "by Browsh v";
}
return by + this.config.browsh_version + " ";
} }
_getUserFooter() { _getUserFooter() {
@ -97,24 +98,29 @@ export default MixinBase =>
_getDonateCall() { _getDonateCall() {
let donating; let donating;
if (this.userHasShownSupport()) { return '' } if (this.userHasShownSupport()) {
return "";
}
if (this._raw_mode_type === "raw_text_html") { if (this._raw_mode_type === "raw_text_html") {
donating = '<a href="https://www.brow.sh/donate">donating</a>'; donating = '<a href="https://www.brow.sh/donate">donating</a>';
} else { } else {
donating = 'brow.sh/donate'; donating = "brow.sh/donate";
} }
return '\nPlease consider ' + donating + return (
' to help all those with slow and/or expensive internet.' "\nPlease consider " +
donating +
" to help all those with slow and/or expensive internet."
);
} }
_getFooter() { _getFooter() {
let start, end; let start, end;
if (this._raw_mode_type === "raw_text_html") { if (this._raw_mode_type === "raw_text_html") {
start = '<span class="browsh-footer">'; start = '<span class="browsh-footer">';
end = '</span></pre></body></html>'; end = "</span></pre></body></html>";
} else { } else {
start = ''; start = "";
end = ''; end = "";
} }
return ( return (
start + start +