diff --git a/extension/common.js b/extension/common.js index aa38379..c0e0ad3 100644 --- a/extension/common.js +++ b/extension/common.js @@ -225,6 +225,15 @@ function match({url, tabId}) { // if s is an array select a random string if (Array.isArray(s)) { s = s[Math.floor(Math.random() * s.length)]; + // set session mode if key is either on _[key] or _['*'] lists + if (prefs.custom._ && Array.isArray(prefs.custom._)) { + if (prefs.custom._.indexOf(key) !== -1) { + prefs.custom[key] = s; + } + else if (prefs.custom._.indexOf('*') !== -1) { + prefs.custom['*'] = s; + } + } } if (s) { return ua.parse(s); diff --git a/extension/data/options/index.html b/extension/data/options/index.html index 2befbd8..a44bee5 100644 --- a/extension/data/options/index.html +++ b/extension/data/options/index.html @@ -36,7 +36,7 @@
+ - - + -
diff --git a/extension/data/options/index.js b/extension/data/options/index.js index ba923a9..9838838 100644 --- a/extension/data/options/index.js +++ b/extension/data/options/index.js @@ -93,3 +93,9 @@ document.getElementById('reset').addEventListener('click', e => { }); } }); + +document.getElementById('help').addEventListener('click', () => { + chrome.tabs.create({ + url: chrome.runtime.getManifest().homepage_url + }); +});