diff options
Diffstat (limited to 'assets')
24 files changed, 35 insertions, 7 deletions
diff --git a/assets/images/Screen Shot Chrome 1.png b/assets/images/Screen Shot Chrome 1.png new file mode 100644 index 00000000..65e18e2a --- /dev/null +++ b/assets/images/Screen Shot Chrome 1.png Binary files differdiff --git a/assets/images/Screen Shot Chrome 2.png b/assets/images/Screen Shot Chrome 2.png new file mode 100644 index 00000000..7bb98a4a --- /dev/null +++ b/assets/images/Screen Shot Chrome 2.png Binary files differdiff --git a/assets/images/Screen Shot Chrome 3.png b/assets/images/Screen Shot Chrome 3.png new file mode 100644 index 00000000..3a4fbd35 --- /dev/null +++ b/assets/images/Screen Shot Chrome 3.png Binary files differdiff --git a/assets/images/Screen Shot Chrome 4.png b/assets/images/Screen Shot Chrome 4.png new file mode 100644 index 00000000..8954e923 --- /dev/null +++ b/assets/images/Screen Shot Chrome 4.png Binary files differdiff --git a/assets/images/Screen Shot Chrome 5.png b/assets/images/Screen Shot Chrome 5.png new file mode 100644 index 00000000..bf0ffa08 --- /dev/null +++ b/assets/images/Screen Shot Chrome 5.png Binary files differdiff --git a/assets/images/Screen Shot FF 1.png b/assets/images/Screen Shot FF 1.png new file mode 100644 index 00000000..e4be8989 --- /dev/null +++ b/assets/images/Screen Shot FF 1.png Binary files differdiff --git a/assets/images/Screen Shot FF 2.png b/assets/images/Screen Shot FF 2.png new file mode 100644 index 00000000..018789a3 --- /dev/null +++ b/assets/images/Screen Shot FF 2.png Binary files differdiff --git a/assets/images/Screen Shot FF 3.png b/assets/images/Screen Shot FF 3.png new file mode 100644 index 00000000..90d28bda --- /dev/null +++ b/assets/images/Screen Shot FF 3.png Binary files differdiff --git a/assets/images/Screen Shot FF 4.png b/assets/images/Screen Shot FF 4.png new file mode 100644 index 00000000..f83e8f29 --- /dev/null +++ b/assets/images/Screen Shot FF 4.png Binary files differdiff --git a/assets/images/Screen Shot FF 5.png b/assets/images/Screen Shot FF 5.png new file mode 100644 index 00000000..fc821639 --- /dev/null +++ b/assets/images/Screen Shot FF 5.png Binary files differdiff --git a/assets/images/amo-badge.png b/assets/images/amo-badge.png new file mode 100644 index 00000000..9cb49bba --- /dev/null +++ b/assets/images/amo-badge.png Binary files differdiff --git a/assets/images/buy-me-a-coffee.png b/assets/images/buy-me-a-coffee.png new file mode 100644 index 00000000..1bb2ad61 --- /dev/null +++ b/assets/images/buy-me-a-coffee.png Binary files differdiff --git a/assets/images/chevron-down.svg b/assets/images/chevron-down.svg new file mode 100644 index 00000000..7679f267 --- /dev/null +++ b/assets/images/chevron-down.svg @@ -0,0 +1,3 @@ +<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 512 512'> + <polyline points='112 184 256 328 400 184' style='fill:none;stroke:#FF5B56;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px'/> +</svg> \ No newline at end of file diff --git a/assets/images/chrome-badge.png b/assets/images/chrome-badge.png new file mode 100644 index 00000000..4e48b8a6 --- /dev/null +++ b/assets/images/chrome-badge.png Binary files differdiff --git a/assets/images/icon128.png b/assets/images/icon128.png new file mode 100644 index 00000000..ccd689cc --- /dev/null +++ b/assets/images/icon128.png Binary files differdiff --git a/assets/images/icon16.png b/assets/images/icon16.png new file mode 100644 index 00000000..1c510cb7 --- /dev/null +++ b/assets/images/icon16.png Binary files differdiff --git a/assets/images/icon32.png b/assets/images/icon32.png new file mode 100644 index 00000000..d001aab6 --- /dev/null +++ b/assets/images/icon32.png Binary files differdiff --git a/assets/images/icon48.png b/assets/images/icon48.png new file mode 100644 index 00000000..4ddd22eb --- /dev/null +++ b/assets/images/icon48.png Binary files differdiff --git a/assets/images/logo-small.png b/assets/images/logo-small.png new file mode 100644 index 00000000..09e50d18 --- /dev/null +++ b/assets/images/logo-small.png Binary files differdiff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 00000000..ecb3e381 --- /dev/null +++ b/assets/images/logo.png Binary files differdiff --git a/assets/images/small-tile.png b/assets/images/small-tile.png new file mode 100644 index 00000000..a3ed077b --- /dev/null +++ b/assets/images/small-tile.png Binary files differdiff --git a/assets/javascript/localise.js b/assets/javascript/localise.js new file mode 100644 index 00000000..e408025d --- /dev/null +++ b/assets/javascript/localise.js @@ -0,0 +1,19 @@ +window.browser = window.browser || window.chrome; + +function localizeHtmlPage() { + // Localize using __MSG_***__ data tags + var data = document.querySelectorAll('[data-localize]'); + + for (var i in data) if (data.hasOwnProperty(i)) { + var obj = data[i]; + var tag = obj.getAttribute('data-localize').toString(); + + var msg = tag.replace(/__MSG_(\w+)__/g, function (_match, v1) { + return v1 ? browser.i18n.getMessage(v1) : null; + }); + + if (msg && msg !== tag) obj.innerHTML = msg; + } +} + +localizeHtmlPage(); \ No newline at end of file diff --git a/assets/persist-invidious-prefs.js b/assets/javascript/persist-invidious-prefs.js index 4c13a310..4c13a310 100644 --- a/assets/persist-invidious-prefs.js +++ b/assets/javascript/persist-invidious-prefs.js diff --git a/assets/remove-twitter-sw.js b/assets/javascript/remove-twitter-sw.js index d1b30637..d9d3ce3e 100644 --- a/assets/remove-twitter-sw.js +++ b/assets/javascript/remove-twitter-sw.js @@ -5,17 +5,17 @@ const nitterDefault = 'https://nitter.net'; let disableNitter; let nitterInstance; let redirectBypassFlag; -let whitelist; +let exceptions; window.browser = window.browser || window.chrome; -function isNotWhitelisted(url) { - return !whitelist.some(regex => (regex.test(url.href))); +function isNotException(url) { + return !exceptions.some(regex => (regex.test(url.href))); } function shouldRedirect(url) { return !redirectBypassFlag && - isNotWhitelisted(url) && + isNotException(url) && !disableNitter && url.host !== nitterInstance && !url.pathname.includes('/home'); @@ -32,7 +32,13 @@ function redirectTwitter(url) { } browser.storage.sync.get( - ['nitterInstance', 'disableNitter', 'removeTwitterSW', 'redirectBypassFlag'], + [ + 'nitterInstance', + 'disableNitter', + 'removeTwitterSW', + 'redirectBypassFlag', + 'exceptions' + ], (result) => { redirectBypassFlag = result.redirectBypassFlag; browser.storage.sync.set({ @@ -41,8 +47,8 @@ browser.storage.sync.get( if (!result.removeTwitterSW) { disableNitter = result.disableNitter; nitterInstance = result.nitterInstance || nitterDefault; - whitelist = result.whitelist ? result.whitelist.map(e => { - return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); + exceptions = result.exceptions ? result.exceptions.map(e => { + return new RegExp(e); }) : []; navigator.serviceWorker.getRegistrations().then(registrations => { for (let registration of registrations) { |