diff --git a/common.js b/common.js index 12fbd85..5c2663a 100644 --- a/common.js +++ b/common.js @@ -66,7 +66,11 @@ function match(url) { } else { const h = hostname(url); - const s = prefs.custom[h]; + let s = prefs.custom[h] || prefs.custom['*']; + // if s is an array select a random string + if (Array.isArray(s)) { + s = s[Math.floor(Math.random() * s.length)]; + } if (s) { const o = {}; o.userAgent = s; @@ -80,7 +84,7 @@ function match(url) { return o; } else { - return ua.userAgent ? false : true; + return !ua.userAgent; } } } @@ -176,7 +180,7 @@ User-Agent String: ${prefs.mode === 'custom' ? custom : prefs.ua || navigator.us // FAQs & Feedback chrome.storage.local.get({ 'version': null, - 'faqs': navigator.userAgent.indexOf('Firefox') === -1, + 'faqs': true, 'last-update': 0, }, prefs => { const version = chrome.runtime.getManifest().version; @@ -207,7 +211,3 @@ chrome.storage.local.get({ chrome.runtime.getManifest().homepage_url + '?rd=feedback&name=' + name + '&version=' + version ); } - -chrome.tabs.create({ - url: 'data/popup/index.html' -}) diff --git a/data/icons/128.png b/data/icons/128.png index 39dc5a9..5a1728e 100644 Binary files a/data/icons/128.png and b/data/icons/128.png differ diff --git a/data/icons/16.png b/data/icons/16.png index 5e5227c..5f500f4 100644 Binary files a/data/icons/16.png and b/data/icons/16.png differ diff --git a/data/icons/18.png b/data/icons/18.png new file mode 100644 index 0000000..265595a Binary files /dev/null and b/data/icons/18.png differ diff --git a/data/icons/19.png b/data/icons/19.png new file mode 100644 index 0000000..c9b4803 Binary files /dev/null and b/data/icons/19.png differ diff --git a/data/icons/256.png b/data/icons/256.png index c1aa4df..6024c3a 100644 Binary files a/data/icons/256.png and b/data/icons/256.png differ diff --git a/data/icons/32.png b/data/icons/32.png index ce9a36a..d98aac4 100644 Binary files a/data/icons/32.png and b/data/icons/32.png differ diff --git a/data/icons/36.png b/data/icons/36.png new file mode 100644 index 0000000..6496212 Binary files /dev/null and b/data/icons/36.png differ diff --git a/data/icons/38.png b/data/icons/38.png new file mode 100644 index 0000000..4533c51 Binary files /dev/null and b/data/icons/38.png differ diff --git a/data/icons/48.png b/data/icons/48.png index 6687008..8643a43 100644 Binary files a/data/icons/48.png and b/data/icons/48.png differ diff --git a/data/icons/512.png b/data/icons/512.png index e8e74fa..d262332 100644 Binary files a/data/icons/512.png and b/data/icons/512.png differ diff --git a/data/icons/64.png b/data/icons/64.png index dc6ac1d..d005e4a 100644 Binary files a/data/icons/64.png and b/data/icons/64.png differ diff --git a/data/icons/active/128.png b/data/icons/active/128.png new file mode 100644 index 0000000..bac2a00 Binary files /dev/null and b/data/icons/active/128.png differ diff --git a/data/icons/active/16.png b/data/icons/active/16.png index 614b462..f4d5c6d 100644 Binary files a/data/icons/active/16.png and b/data/icons/active/16.png differ diff --git a/data/icons/active/18.png b/data/icons/active/18.png new file mode 100644 index 0000000..c820a17 Binary files /dev/null and b/data/icons/active/18.png differ diff --git a/data/icons/active/19.png b/data/icons/active/19.png new file mode 100644 index 0000000..b7b6c51 Binary files /dev/null and b/data/icons/active/19.png differ diff --git a/data/icons/active/256.png b/data/icons/active/256.png new file mode 100644 index 0000000..24da822 Binary files /dev/null and b/data/icons/active/256.png differ diff --git a/data/icons/active/32.png b/data/icons/active/32.png index d5d1260..57822fb 100644 Binary files a/data/icons/active/32.png and b/data/icons/active/32.png differ diff --git a/data/icons/active/36.png b/data/icons/active/36.png new file mode 100644 index 0000000..b87ea10 Binary files /dev/null and b/data/icons/active/36.png differ diff --git a/data/icons/active/38.png b/data/icons/active/38.png new file mode 100644 index 0000000..054e54a Binary files /dev/null and b/data/icons/active/38.png differ diff --git a/data/icons/active/48.png b/data/icons/active/48.png index d7c85a0..0ba8aa7 100644 Binary files a/data/icons/active/48.png and b/data/icons/active/48.png differ diff --git a/data/icons/active/512.png b/data/icons/active/512.png new file mode 100644 index 0000000..d88307d Binary files /dev/null and b/data/icons/active/512.png differ diff --git a/data/icons/active/64.png b/data/icons/active/64.png index 320d281..aebdf46 100644 Binary files a/data/icons/active/64.png and b/data/icons/active/64.png differ diff --git a/data/options/index.html b/data/options/index.html index aeca2cd..7388bcb 100644 --- a/data/options/index.html +++ b/data/options/index.html @@ -8,6 +8,10 @@ padding: 10px; } textarea { width: 100%; } + .h { + text-decoration: underline; + text-decoration-style: dashed; + } @@ -15,7 +19,7 @@
- + |
- + |
- Insert a sample JSON object. + Insert a sample JSON object. |