diff --git a/src/Makefile b/src/Makefile index 14b7e5a..881dab8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -40,6 +40,10 @@ js/inject.dist.js: $(BROWSERIFY) inject.js [ -d js ] || mkdir -p js $(BROWSERIFY) -o js/inject.dist.js inject.js + # Firefox requires the last command to evaluate to something serializable + # https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/executeScript#Return_value + echo ";undefined" >> js/inject.dist.js + .PHONY: clean clean: rm -rf $(CLEAN_FILES) diff --git a/src/background.js b/src/background.js index e83ddce..13d4eae 100644 --- a/src/background.js +++ b/src/background.js @@ -492,7 +492,7 @@ async function parseFields(settings, login) { lines.forEach(function(line) { // split key / value var parts = line - .split(/(?<=^[^:]+):/) + .split(":") .map(value => value.trim()) .filter(value => value.length); if (parts.length != 2) { diff --git a/src/options/options.html b/src/options/options.html index f2f2e8f..9bbff45 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -1,6 +1,7 @@
+ diff --git a/src/options/options.less b/src/options/options.less index bd24057..5501bdc 100644 --- a/src/options/options.less +++ b/src/options/options.less @@ -69,9 +69,11 @@ h3:first-child { .add-store { cursor: pointer; - display: block; + display: inline-block; margin-top: 8px; margin-bottom: 30px; + color: rgb(17, 85, 204); + text-decoration: underline; } .error { diff --git a/src/popup/interface.js b/src/popup/interface.js index 22cb458..4d2cc01 100644 --- a/src/popup/interface.js +++ b/src/popup/interface.js @@ -24,7 +24,7 @@ function Interface(settings, logins) { this.settings = settings; this.logins = logins; this.results = []; - this.currentDomainOnly = !settings.tab.url.match(/^chrome:\/\//); + this.currentDomainOnly = !settings.tab.url.match(/^(chrome|about):/); this.searchPart = new SearchInterface(this); // initialise with empty search diff --git a/src/popup/popup.html b/src/popup/popup.html index 1488942..cf39c26 100644 --- a/src/popup/popup.html +++ b/src/popup/popup.html @@ -1,6 +1,7 @@ + diff --git a/src/popup/popup.js b/src/popup/popup.js index ebfb6aa..653d3c7 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -141,10 +141,14 @@ async function withLogin(action) { break; } + // Firefox requires data to be serializable, + // this removes everything offending such as functions + const login = JSON.parse(JSON.stringify(this.login)); + // hand off action to background script var response = await chrome.runtime.sendMessage({ action: action, - login: this.login + login: login }); if (response.status != "ok") { throw new Error(response.message); diff --git a/src/popup/popup.less b/src/popup/popup.less index 488ec55..8fac3a9 100644 --- a/src/popup/popup.less +++ b/src/popup/popup.less @@ -30,7 +30,7 @@ body { white-space: nowrap; background-color: @bg-color; color: @text-color; - font-weight: 200; + font-weight: 300; } html::-webkit-scrollbar,