about summary refs log tree commit diff stats
path: root/src/pages/options
diff options
context:
space:
mode:
authorBobIsMyManager <ahoumatt@yahoo.com>2022-04-13 14:51:36 +0000
committerGitHub <noreply@github.com>2022-04-13 17:51:36 +0300
commitf05e1b996a2b74c1d4e34038f4d2debb145ff841 (patch)
tree9981f15990efb6220ab7b8a38d062c4984f3bf1b /src/pages/options
parentMerge branch 'master' of https://github.com/libredirect/libredirect (diff)
downloadlibredirect-f05e1b996a2b74c1d4e34038f4d2debb145ff841.zip
I2P support for search, Imgur and Wikipedia (#189)
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/imgur/imgur.html32
-rw-r--r--src/pages/options/imgur/imgur.js30
-rw-r--r--src/pages/options/instagram/instagram.html4
-rw-r--r--src/pages/options/lbry/lbry.html4
-rw-r--r--src/pages/options/medium/medium.html4
-rw-r--r--src/pages/options/peertube/peertube.html4
-rw-r--r--src/pages/options/pixiv/pixiv.html6
-rw-r--r--src/pages/options/reddit/reddit.html4
-rw-r--r--src/pages/options/reddit/reddit.js2
-rw-r--r--src/pages/options/search/search.html76
-rw-r--r--src/pages/options/search/search.js55
-rw-r--r--src/pages/options/sendTargets/sendTargets.html4
-rw-r--r--src/pages/options/spotify/spotify.html4
-rw-r--r--src/pages/options/tiktok/tiktok.html4
-rw-r--r--src/pages/options/translate/translate.html6
-rw-r--r--src/pages/options/twitter/twitter.html4
-rw-r--r--src/pages/options/wikipedia/wikipedia.html30
-rw-r--r--src/pages/options/wikipedia/wikipedia.js21
-rw-r--r--src/pages/options/youtube/youtube.html34
-rw-r--r--src/pages/options/youtubeMusic/youtubeMusic.html42
-rw-r--r--src/pages/options/youtubeMusic/youtubeMusic.js2
21 files changed, 296 insertions, 76 deletions
diff --git a/src/pages/options/imgur/imgur.html b/src/pages/options/imgur/imgur.html
index a769bd06..b00c7d71 100644
--- a/src/pages/options/imgur/imgur.html
+++ b/src/pages/options/imgur/imgur.html
@@ -139,6 +139,7 @@
       <select id="protocol">
         <option value="normal" data-localise="__MSG_normal__">Normal</option>
         <option value="tor" data-localise="__MSG_tor__">Tor</option>
+	<option value="i2p" data-localise="__MSG_i2p__">I2P</option>
       </select>
     </div>
 
@@ -167,6 +168,7 @@
         </form>
         <div class="checklist custom-checklist"></div>
       </div>
+
       <div class="tor">
         <div class="some-block option-block">
           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
@@ -178,7 +180,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://rimgo.com" type="url" />
+            <input class="custom-instance" placeholder="http://rimgo.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -190,13 +192,37 @@
         </form>
         <div class="checklist custom-checklist"></div>
       </div>
+
+      <div class="i2p">
+        <div class="some-block option-block">
+	  <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+	</div>
+	<div class="checklist checklist"></div>
+	<hr>
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+	</div>
+	<form class="custom-instance-form">
+	  <div class="some-block option-block">
+	    <input class="custom-instance" placeholder="http://rimgo.i2p" type="url" />
+	    <button type="submit" class="add add-instance">
+	      <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" 
+		fill="currentColor">
+		<path d="M0 0h24v24H0V0z" fill="none" />
+		<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+	      </svg>
+	    </button>
+	  </div>
+	</form>
+	<div class="checklist custom-checklist"></div>
+      </div>
+
     </div>
   </section>
 
-
   <script type="module" src="../init.js"></script>
   <script type="module" src="./imgur.js"></script>
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/imgur/imgur.js b/src/pages/options/imgur/imgur.js
index 9742bfd2..26a7d417 100644
--- a/src/pages/options/imgur/imgur.js
+++ b/src/pages/options/imgur/imgur.js
@@ -18,13 +18,21 @@ protocolElement.addEventListener("change",
 function changeProtocolSettings(protocol) {
     let normalDiv = document.getElementsByClassName("normal")[0];
     let torDiv = document.getElementsByClassName("tor")[0];
+    let i2pDiv = document.getElementsByClassName("i2p")[0];
     if (protocol == 'normal') {
-        normalDiv.style.display = 'block';
-        torDiv.style.display = 'none';
+	normalDiv.style.display = 'block';
+	torDiv.style.display = 'none';
+	i2pDiv.style.display = 'none';
     }
     else if (protocol == 'tor') {
-        normalDiv.style.display = 'none';
-        torDiv.style.display = 'block';
+	normalDiv.style.display = 'none';
+	torDiv.style.display = 'block';
+	i2pDiv.style.display = 'none';
+    }
+    else if (protocol == 'i2p') {
+	normalDiv.style.display = 'none';
+	torDiv.style.display = 'none';
+	i2pDiv.style.display = 'block';
     }
 }
 
@@ -32,6 +40,7 @@ imgurHelper.init().then(() => {
     disableImgurElement.checked = !imgurHelper.getDisable();
 
     let protocol = imgurHelper.getProtocol();
+    console.log('protocol', protocol);
     protocolElement.value = protocol;
     changeProtocolSettings(protocol);
 
@@ -56,4 +65,15 @@ imgurHelper.init().then(() => {
         imgurHelper.getRimgoTorCustomRedirects,
         imgurHelper.setRimgoTorCustomRedirects
     );
-});
\ No newline at end of file
+
+    commonHelper.processDefaultCustomInstances(
+	'rimgo',
+	'i2p',
+	imgurHelper,
+	document,
+	imgurHelper.getRimgoI2pRedirectsChecks,
+	imgurHelper.setRimgoI2pRedirectsChecks,
+	imgurHelper.getRimgoI2pCustomRedirects,
+	imgurHelper.setRimgoI2pCustomRedirects
+    );
+});
diff --git a/src/pages/options/instagram/instagram.html b/src/pages/options/instagram/instagram.html
index baf5166f..ced087b9 100644
--- a/src/pages/options/instagram/instagram.html
+++ b/src/pages/options/instagram/instagram.html
@@ -171,7 +171,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://bibliogram.com" type="url" />
+            <input class="custom-instance" placeholder="http://bibliogram.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -191,4 +191,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/lbry/lbry.html b/src/pages/options/lbry/lbry.html
index 40000076..4f7332dc 100644
--- a/src/pages/options/lbry/lbry.html
+++ b/src/pages/options/lbry/lbry.html
@@ -179,7 +179,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://librarian.com" type="url" />
+            <input class="custom-instance" placeholder="http://librarian.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -200,4 +200,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/medium/medium.html b/src/pages/options/medium/medium.html
index fde374eb..54dbba88 100644
--- a/src/pages/options/medium/medium.html
+++ b/src/pages/options/medium/medium.html
@@ -180,7 +180,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://scribe.com" type="url" />
+            <input class="custom-instance" placeholder="http://scribe.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -201,4 +201,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/peertube/peertube.html b/src/pages/options/peertube/peertube.html
index c4190498..f8258bfa 100644
--- a/src/pages/options/peertube/peertube.html
+++ b/src/pages/options/peertube/peertube.html
@@ -179,7 +179,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://simpleertube.com" type="url" />
+            <input class="custom-instance" placeholder="http://simpleertube.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -199,4 +199,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/pixiv/pixiv.html b/src/pages/options/pixiv/pixiv.html
index 9ce7c1d8..775844d8 100644
--- a/src/pages/options/pixiv/pixiv.html
+++ b/src/pages/options/pixiv/pixiv.html
@@ -168,7 +168,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://pixiv.moe" type="url" />
+            <input class="custom-instance" placeholder="https://pixivMoe.com" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -191,7 +191,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://pixivMoe.com" type="url" />
+            <input class="custom-instance" placeholder="http://pixivMoe.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -212,4 +212,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/reddit/reddit.html b/src/pages/options/reddit/reddit.html
index 820294b2..805cb567 100644
--- a/src/pages/options/reddit/reddit.html
+++ b/src/pages/options/reddit/reddit.html
@@ -199,7 +199,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://libreddit.com" type="url" />
+            <input class="custom-instance" placeholder="http://libreddit.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -252,7 +252,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://teddit.com" type="url" />
+            <input class="custom-instance" placeholder="http://teddit.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
diff --git a/src/pages/options/reddit/reddit.js b/src/pages/options/reddit/reddit.js
index 2645ed41..fea1c08b 100644
--- a/src/pages/options/reddit/reddit.js
+++ b/src/pages/options/reddit/reddit.js
@@ -126,4 +126,4 @@ redditHelper.init().then(() => {
         redditHelper.setTedditTorCustomRedirects
     );
 
-})
\ No newline at end of file
+})
diff --git a/src/pages/options/search/search.html b/src/pages/options/search/search.html
index a5f26ab3..a5d2a3ca 100644
--- a/src/pages/options/search/search.html
+++ b/src/pages/options/search/search.html
@@ -150,6 +150,7 @@
         <select id="protocol">
           <option value="normal" data-localise="__MSG_normal__">Normal</option>
           <option value="tor" data-localise="__MSG_tor__">Tor</option>
+	  <option value="i2p" data-localise="__MSG_i2p__">I2P</option>
         </select>
       </div>
     </div>
@@ -210,6 +211,30 @@
         </form>
         <div class="checklist custom-checklist"></div>
       </div>
+      <div class="i2p">
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+	</div>
+	<div class="checklist checklist">
+	</div>
+	<hr>
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+	</div>
+	<form class="custom-instance-form">
+	  <div class="some-block option-block">
+	    <input class="custom-instance" placeholder="https://searx.com" type="url" />
+	    <button type="submit" class="add add-instance">
+	      <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+		fill="currentColor">
+		<path d="M0 0h24v24H0V0z" fill="none" />
+		<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+	      </svg>
+	    </button>
+	  </div>
+	</form>
+	<div class="checklist custom-checklist"></div>
+      </div>
     </div>
 
     <div id="searxng">
@@ -262,6 +287,30 @@
         </form>
         <div class="checklist custom-checklist"></div>
       </div>
+      <div class="i2p">
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+	</div>
+	<div class="checklist checklist">
+	</div>
+	<hr>
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+	</div>
+	<form class="custom-instance-form">
+	  <div class="some-block option-block">
+	    <input class="custom-instance" placeholder="https://searxng.com" type="url" />
+	    <button type="submit" class="add add-instance">
+	      <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+		fill="currentColor">
+		<path d="M0 0h24v24H0V0z" fill="none" />
+		<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+	      </svg>
+	    </button>
+	  </div>
+	</form>
+	<div class="checklist custom-checklist"></div>
+      </div>
     </div>
 
     <div id="whoogle">
@@ -314,6 +363,30 @@
         </form>
         <div class="checklist custom-checklist"></div>
       </div>
+      <div class="i2p">
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+	</div>
+	<div class="checklist checklist">
+	</div>
+	<hr>
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+	</div>
+	<form class="custom-instance-form">
+	  <div class="some-block option-block">
+	    <input class="custom-instance" placeholder="https://whoogle.com" type="url" />
+	    <button type="submit" class="add add-instance">
+	      <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+		fill="currentColor">
+		<path d="M0 0h24v24H0V0z" fill="none" />
+		<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+	      </svg>
+	    </button>
+	  </div>
+	</form>
+	<div class="checklist custom-checklist"></div>
+      </div>
     </div>
 
   </section>
@@ -324,4 +397,5 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
+
diff --git a/src/pages/options/search/search.js b/src/pages/options/search/search.js
index d96665e9..0eeac5ed 100644
--- a/src/pages/options/search/search.js
+++ b/src/pages/options/search/search.js
@@ -63,12 +63,15 @@ protocolElement.addEventListener("change",
 function changeProtocolSettings(protocol) {
   let normalsearxDiv = searxDivElement.getElementsByClassName("normal")[0];
   let torsearxDiv = searxDivElement.getElementsByClassName("tor")[0];
+  let i2psearxDiv = searxDivElement.getElementsByClassName("i2p")[0];
 
   let normalsearxngDiv = searxngDivElement.getElementsByClassName("normal")[0];
   let torsearxngDiv = searxngDivElement.getElementsByClassName("tor")[0];
+  let i2psearxngDiv = searxngDivElement.getElementsByClassName("i2p")[0];
 
   let normalwhoogleDiv = whoogleDivElement.getElementsByClassName("normal")[0];
   let torwhoogleDiv = whoogleDivElement.getElementsByClassName("tor")[0];
+  let i2pwhoogleDiv = whoogleDivElement.getElementsByClassName("i2p")[0];
 
   if (protocol == 'normal') {
     normalsearxDiv.style.display = 'block';
@@ -77,6 +80,9 @@ function changeProtocolSettings(protocol) {
     torsearxDiv.style.display = 'none';
     torsearxngDiv.style.display = 'none';
     torwhoogleDiv.style.display = 'none';
+    i2psearxDiv.style.display = 'none';
+    i2psearxngDiv.style.display = 'none';
+    i2pwhoogleDiv.style.display = 'none';
   }
   else if (protocol == 'tor') {
     normalsearxDiv.style.display = 'none';
@@ -85,6 +91,20 @@ function changeProtocolSettings(protocol) {
     torsearxDiv.style.display = 'block';
     torsearxngDiv.style.display = 'block';
     torwhoogleDiv.style.display = 'block';
+    i2psearxDiv.style.display = 'none';
+    i2psearxngDiv.style.display = 'none';
+    i2pwhoogleDiv.style.display = 'none';
+  }
+  else if (protocol == 'i2p') {
+    normalsearxDiv.style.display = 'none';
+    normalsearxngDiv.style.display = 'none';
+    normalwhoogleDiv.style.display = 'none';
+    torsearxDiv.style.display = 'none';
+    torsearxngDiv.style.display = 'none';
+    torwhoogleDiv.style.display = 'none';
+    i2psearxDiv.style.display = 'block';
+    i2psearxngDiv.style.display = 'block';
+    i2pwhoogleDiv.style.display = 'block';
   }
 }
 
@@ -121,6 +141,17 @@ searchHelper.init().then(() => {
   );
 
   commonHelper.processDefaultCustomInstances(
+    'searx',
+    'i2p',
+    searchHelper,
+    document,
+    searchHelper.getSearxI2pRedirectsChecks,
+    searchHelper.setSearxI2pRedirectsChecks,
+    searchHelper.getSearxI2pCustomRedirects,
+    searchHelper.setSearxI2pCustomRedirects
+  );
+
+  commonHelper.processDefaultCustomInstances(
     'searxng',
     'normal',
     searchHelper,
@@ -143,6 +174,17 @@ searchHelper.init().then(() => {
   );
 
   commonHelper.processDefaultCustomInstances(
+    'searxng',
+    'i2p',
+    searchHelper,
+    document,
+    searchHelper.getSearxngI2pRedirectsChecks,
+    searchHelper.setSearxngI2pRedirectsChecks,
+    searchHelper.getSearxngI2pCustomRedirects,
+    searchHelper.setSearxngI2pCustomRedirects
+  );
+
+  commonHelper.processDefaultCustomInstances(
     'whoogle',
     'normal',
     searchHelper,
@@ -163,4 +205,15 @@ searchHelper.init().then(() => {
     searchHelper.getWhoogleTorCustomRedirects,
     searchHelper.setWhoogleTorCustomRedirects
   );
-});
\ No newline at end of file
+
+  commonHelper.processDefaultCustomInstances(
+    'whoogle',
+    'i2p',
+    searchHelper,
+    document,
+    searchHelper.getWhoogleI2pRedirectsChecks,
+    searchHelper.setWhoogleI2pRedirectsChecks,
+    searchHelper.getWhoogleI2pCustomRedirects,
+    searchHelper.setWhoogleI2pCustomRedirects
+  );
+});
diff --git a/src/pages/options/sendTargets/sendTargets.html b/src/pages/options/sendTargets/sendTargets.html
index 7da5d1fa..786b310b 100644
--- a/src/pages/options/sendTargets/sendTargets.html
+++ b/src/pages/options/sendTargets/sendTargets.html
@@ -178,7 +178,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://send.com" type="url" />
+            <input class="custom-instance" placeholder="http://send.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -199,4 +199,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/spotify/spotify.html b/src/pages/options/spotify/spotify.html
index 731e7d5a..353d777d 100644
--- a/src/pages/options/spotify/spotify.html
+++ b/src/pages/options/spotify/spotify.html
@@ -178,7 +178,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://soju.com" type="url" />
+            <input class="custom-instance" placeholder="http://soju.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -198,4 +198,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/tiktok/tiktok.html b/src/pages/options/tiktok/tiktok.html
index 8136ccd0..11a7f607 100644
--- a/src/pages/options/tiktok/tiktok.html
+++ b/src/pages/options/tiktok/tiktok.html
@@ -179,7 +179,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://proxiTok.com" type="url" />
+            <input class="custom-instance" placeholder="http://proxiTok.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -200,4 +200,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/translate/translate.html b/src/pages/options/translate/translate.html
index 3116a0ac..d71060b4 100644
--- a/src/pages/options/translate/translate.html
+++ b/src/pages/options/translate/translate.html
@@ -430,7 +430,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://simplyTranslate.com" type="url" />
+            <input class="custom-instance" placeholder="http://simplyTranslate.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -481,7 +481,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://lingva.com" type="url" />
+            <input class="custom-instance" placeholder="http://lingva.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -502,4 +502,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/twitter/twitter.html b/src/pages/options/twitter/twitter.html
index d017ba78..1e312ea5 100644
--- a/src/pages/options/twitter/twitter.html
+++ b/src/pages/options/twitter/twitter.html
@@ -284,7 +284,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://nitter.com" type="url" />
+            <input class="custom-instance" placeholder="http://nitter.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -306,4 +306,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/wikipedia/wikipedia.html b/src/pages/options/wikipedia/wikipedia.html
index 728f2b10..b0f2e064 100644
--- a/src/pages/options/wikipedia/wikipedia.html
+++ b/src/pages/options/wikipedia/wikipedia.html
@@ -138,6 +138,7 @@
       <select id="protocol">
         <option value="normal" data-localise="__MSG_normal__">Normal</option>
         <option value="tor" data-localise="__MSG_tor__">Tor</option>
+	<option value="i2p" data-localise="__MSG_i2p__">I2P</option>
       </select>
     </div>
 
@@ -180,7 +181,7 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://wikiless.com" type="url" />
+            <input class="custom-instance" placeholder="http://wikiless.onion" type="url" />
             <button type="submit" class="add add-instance">
               <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
@@ -191,8 +192,33 @@
           </div>
         </form>
         <div class="checklist custom-checklist"></div>
+      </div>
 
+      <div class="i2p">
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+	</div>
+	<div class="checklist checklist">
+	</div>
+	<hr>
+	<div class="some-block option-block">
+	  <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+	</div>
+	<form class="custom-instance-form">
+	  <div class="some-block option-block">
+	    <input class="custom-instance" placeholder="http://wikiless.i2p" type="url" />
+	    <button type="submit" class="add add-instance">
+	      <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+		fill="currentColor">
+		<path d="M0 0h24v24H0V0z" fill="none" />
+		<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+	      </svg>
+	    </button>
+	  </div>
+	</form>
+	<div class="checklist custom-checklist"></div>
       </div>
+
     </div>
   </section>
 
@@ -201,4 +227,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/wikipedia/wikipedia.js b/src/pages/options/wikipedia/wikipedia.js
index 1cad27a3..a2dafbfe 100644
--- a/src/pages/options/wikipedia/wikipedia.js
+++ b/src/pages/options/wikipedia/wikipedia.js
@@ -18,13 +18,21 @@ protocolElement.addEventListener("change",
 function changeProtocolSettings(protocol) {
     let normalDiv = document.getElementsByClassName("normal")[0];
     let torDiv = document.getElementsByClassName("tor")[0];
+    let i2pDiv = document.getElementsByClassName("i2p")[0];
     if (protocol == 'normal') {
         normalDiv.style.display = 'block';
         torDiv.style.display = 'none';
+	i2pDiv.style.display = 'none';
     }
     else if (protocol == 'tor') {
         normalDiv.style.display = 'none';
         torDiv.style.display = 'block';
+	i2pDiv.style.display = 'none';
+    }
+    else if (protocol == 'i2p') {
+	normalDiv.style.display = 'none';
+	torDiv.style.display = 'none';
+	i2pDiv.style.display = 'block';
     }
 }
 
@@ -57,4 +65,15 @@ wikipediaHelper.init().then(() => {
         wikipediaHelper.getWikilessTorCustomRedirects,
         wikipediaHelper.setWikilessTorCustomRedirects
     )
-})
\ No newline at end of file
+
+    commonHelper.processDefaultCustomInstances(
+	'wikiless',
+	'i2p',
+	wikipediaHelper,
+	document,
+	wikipediaHelper.getWikilessI2pRedirectsChecks,
+	wikipediaHelper.setWikilessI2pRedirectsChecks,
+	wikipediaHelper.getWikilessI2pCustomRedirects,
+	wikipediaHelper.setWikilessI2pCustomRedirects
+    )
+})
diff --git a/src/pages/options/youtube/youtube.html b/src/pages/options/youtube/youtube.html
index 95ebb7d4..e29fefbe 100644
--- a/src/pages/options/youtube/youtube.html
+++ b/src/pages/options/youtube/youtube.html
@@ -15,7 +15,7 @@
   <section class="links">
 
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24"
+      <svg xmlns="https://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24"
         width="26px" fill="currentColor">
         <path
           d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" />
@@ -75,7 +75,7 @@
 
     <div class="title">
       <!-- https://markentier.tech/posts/2020/10/medium-icon-svg/ -->
-      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
+      <svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
         <circle cx="500" cy="500" r="500" />
         <ellipse ry="475" rx="250" cy="501" cx="1296" />
         <ellipse cx="1682" cy="502" rx="88" ry="424" />
@@ -94,7 +94,7 @@
     </div>
 
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
+      <svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
         <path d="M0 0h24v24H0V0z" fill="none" />
         <path
           d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
@@ -103,7 +103,7 @@
     </div>
 
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+      <svg xmlns="https://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
         <path d="M0 0h24v24H0V0z" fill="none" />
         <path
           d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z" />
@@ -112,7 +112,7 @@
     </div>
 
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+      <svg xmlns="https://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
         <path
           d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" />
       </svg>
@@ -120,7 +120,7 @@
     </div>
 
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+      <svg xmlns="https://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
         <path
           d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" />
       </svg>
@@ -746,7 +746,7 @@
           <div class="some-block option-block">
             <input class="custom-instance" placeholder="https://invidious.com" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -769,9 +769,9 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://invidious.com" type="url" />
+            <input class="custom-instance" placeholder="http://invidious.onion" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -1134,7 +1134,7 @@
           <div class="some-block option-block">
             <input class="custom-instance" placeholder="https://piped.com" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -1157,9 +1157,9 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://piped.com" type="url" />
+            <input class="custom-instance" placeholder="http://piped.onion" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -1262,9 +1262,9 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://material.com" type="url" />
+            <input class="custom-instance" placeholder="https://pipedMaterial.com" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -1286,9 +1286,9 @@
         </div>
         <form class="custom-instance-form">
           <div class="some-block option-block">
-            <input class="custom-instance" placeholder="https://pipedMaterial.com" type="url" />
+            <input class="custom-instance" placeholder="http://pipedMaterial.onion" type="url" />
             <button type="submit" class="add" class="add-instance">
-              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+              <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
                 fill="currentColor">
                 <path d="M0 0h24v24H0V0z" fill="none" />
                 <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
@@ -1311,4 +1311,4 @@
   <script type="module" src="../../../assets/javascripts/localise.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/src/pages/options/youtubeMusic/youtubeMusic.html b/src/pages/options/youtubeMusic/youtubeMusic.html
index d2cc4906..abe04b09 100644
--- a/src/pages/options/youtubeMusic/youtubeMusic.html
+++ b/src/pages/options/youtubeMusic/youtubeMusic.html
@@ -136,32 +136,34 @@
 
     <hr>
 
-    <div id="normal">
 
-      <div class="some-block option-block">
-        <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
-      </div>
-      <div class="checklist" id="beatbump-normal-checklist"></div>
-      <hr>
-      <div class="some-block option-block">
-        <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
-      </div>
-      <form id="custom-beatbump-normal-instance-form">
+    <div id="beatbump">
+      <div class="normal">
+        <div class="some-block option-block">
+          <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+        </div>
+        <div class="checklist checklist"></div>
+        <hr>
         <div class="some-block option-block">
-          <input id="beatbump-normal-custom-instance" placeholder="https://beatbump.com" type="url" />
-          <button type="submit" class="add" id="beatbump-normal-add-instance">
-            <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
-              <path d="M0 0h24v24H0V0z" fill="none" />
-              <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
-            </svg>
-          </button>
+          <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
         </div>
-      </form>
-      <div class="checklist" id="beatbump-normal-custom-checklist"></div>
+        <form class="custom-instance-form">
+          <div class="some-block option-block">
+            <input class="custom-instance" placeholder="https://beatbump.com" type="url" />
+            <button type="submit" class="add add-instance">
+              <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"
+                fill="currentColor">
+                <path d="M0 0h24v24H0V0z" fill="none" />
+                <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
+              </svg>
+            </button>
+          </div>
+        </form>
+        <div class="checklist custom-checklist"></div>
 
+      </div>
     </div>
 
-
   </section>
 
   <script type="module" src="../init.js"></script>
diff --git a/src/pages/options/youtubeMusic/youtubeMusic.js b/src/pages/options/youtubeMusic/youtubeMusic.js
index 5ae354d8..597458d3 100644
--- a/src/pages/options/youtubeMusic/youtubeMusic.js
+++ b/src/pages/options/youtubeMusic/youtubeMusic.js
@@ -19,4 +19,4 @@ youtubeMusicHelper.init().then(() => {
         youtubeMusicHelper.getBeatbumpNormalCustomRedirects,
         youtubeMusicHelper.setBeatbumpNormalCustomRedirects
     )
-});
\ No newline at end of file
+});