diff --git a/README.md b/README.md
index e2ad837..4a38b52 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,11 @@
- [Chrome Extension](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb)
- [Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/)
-A simple browser extension to redirect Twitter & Youtube requests to [Nitter](https://nitter.net/about) & [Invidious](https://www.invidio.us/), works when navigating to the site, or opening links.
+A simple browser extension that redirects Twitter & Youtube requests to privacy friendly alternatives - [Nitter](https://github.com/zedeus/nitter) & [Invidious](https://github.com/omarroth/invidious).
+
+No unnecessary permissions required, only listens for and redirects requests made to twitter.com, www.twitter.com, mobile.twitter.com, youtube.com, www.youtube.com, youtube-nocookie.com, www.youtube-nocookie.com, and m.youtube.com, nothing else.
+
+Allows for setting custom [Nitter](https://github.com/zedeus/nitter/wiki/Instances) & [Invidious](https://github.com/omarroth/invidious/wiki/Invidious-Instances) instances and toggling redirects on & off.
## Build
diff --git a/images/Screen Shot 1.png b/images/Screen Shot 1.png
index 7363026..c5ae227 100644
Binary files a/images/Screen Shot 1.png and b/images/Screen Shot 1.png differ
diff --git a/images/Screen Shot 2.png b/images/Screen Shot 2.png
index f131363..cb7c641 100644
Binary files a/images/Screen Shot 2.png and b/images/Screen Shot 2.png differ
diff --git a/images/Screen Shot 3.png b/images/Screen Shot 3.png
new file mode 100644
index 0000000..4d46108
Binary files /dev/null and b/images/Screen Shot 3.png differ
diff --git a/manifest.json b/manifest.json
index d2c20b0..629bfae 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Privacy Redirect",
"description": "Redirects Twitter & Youtube requests to privacy friendly alternatives (Nitter & Invidious).",
- "version": "1.1.1",
+ "version": "1.1.2",
"manifest_version": 2,
"background": {
"scripts": [
diff --git a/pages/popup/popup.html b/pages/popup/popup.html
index 889ffcd..22ccb02 100644
--- a/pages/popup/popup.html
+++ b/pages/popup/popup.html
@@ -14,7 +14,7 @@
- Version: 1.1.1
+ Version: 1.1.2
@@ -36,9 +36,12 @@
-
+
diff --git a/pages/popup/popup.js b/pages/popup/popup.js
index 2837cdb..799b5ea 100644
--- a/pages/popup/popup.js
+++ b/pages/popup/popup.js
@@ -2,27 +2,50 @@
let disableNitter = document.querySelector('#disableNitter');
let disableInvidious = document.querySelector('#disableInvidious');
+let nitterInstance = document.querySelector('#nitterInstance');
+let invidiousInstance = document.querySelector('#invidiousInstance');
chrome.storage.sync.get(
- ['disableNitter', 'disableInvidious'],
- (result) => {
+ ['disableNitter', 'disableInvidious', 'nitterInstance', 'invidiousInstance'],
+ result => {
disableNitter.checked = !result.disableNitter;
disableInvidious.checked = !result.disableInvidious;
+ nitterInstance.value = result.nitterInstance || '';
+ invidiousInstance.value = result.invidiousInstance || '';
}
);
-disableNitter.addEventListener('change', (event) => {
+function debounce(func, wait, immediate) {
+ let timeout;
+ return function () {
+ let context = this, args = arguments;
+ let later = function () {
+ timeout = null;
+ if (!immediate) func.apply(context, args);
+ };
+ let callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ if (callNow) func.apply(context, args);
+ };
+};
+
+let nitterInstanceChange = debounce(() => {
+ chrome.storage.sync.set({ nitterInstance: nitterInstance.value });
+}, 500);
+
+nitterInstance.addEventListener('input', nitterInstanceChange);
+
+let invidiousInstanceChange = debounce(() => {
+ chrome.storage.sync.set({ invidiousInstance: invidiousInstance.value });
+}, 500);
+
+invidiousInstance.addEventListener('input', invidiousInstanceChange);
+
+disableNitter.addEventListener('change', event => {
chrome.storage.sync.set({ disableNitter: !event.target.checked });
});
-disableInvidious.addEventListener('change', (event) => {
+disableInvidious.addEventListener('change', event => {
chrome.storage.sync.set({ disableInvidious: !event.target.checked });
});
-
-document.querySelector('#options').addEventListener('click', () => {
- if (chrome.runtime.openOptionsPage) {
- chrome.runtime.openOptionsPage();
- } else {
- window.open(chrome.runtime.getURL('../options/options.html'));
- }
-});
\ No newline at end of file
diff --git a/web-ext-config.js b/web-ext-config.js
index abbcbf1..29a5243 100644
--- a/web-ext-config.js
+++ b/web-ext-config.js
@@ -1,5 +1,6 @@
module.exports = {
ignoreFiles: [
'images/Screen*.png',
+ 'images/small-tile.png'
],
};