about summary refs log tree commit diff stats
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/background/background.js2
-rw-r--r--src/pages/options/search/search.html67
-rw-r--r--src/pages/options/search/search.js12
3 files changed, 49 insertions, 32 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index 6b41b347..d019fa28 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -76,7 +76,7 @@ browser.webRequest.onBeforeRequest.addListener(
 
     if (translateHelper.isTranslate(url, initiator)) newUrl = translateHelper.redirect(url);
 
-    if (searchHelper.isSearch(url)) newUrl = searchHelper.redirect(url)
+    if (!newUrl) newUrl = searchHelper.redirect(url)
 
     if (wikipediaHelper.isWikipedia(url, initiator)) newUrl = wikipediaHelper.redirect(url);
 
diff --git a/src/pages/options/search/search.html b/src/pages/options/search/search.html
index 1349445a..5db6d2ab 100644
--- a/src/pages/options/search/search.html
+++ b/src/pages/options/search/search.html
@@ -103,22 +103,25 @@
       <input id="disable-search" type="checkbox" checked />
     </div>
     <div class="some-block option-block">
-      <h4>Frontend</h4>
+      <h4 id="frontend">Frontend</h4>
       <select id="search-frontend">
         <option value="searx">SearX</option>
         <option value="whoogle">Whoogle</option>
+        <option value="startpage">Startpage</option>
       </select>
     </div>
 
-    <div class="some-block option-block">
-      <h4>Protocol</h4>
-      <select id="protocol">
-        <option value="normal">Normal</option>
-        <option value="tor">Tor</option>
-      </select>
-    </div>
+    <div id="searx-whoogle">
+      <div class="some-block option-block">
+        <h4>Protocol</h4>
+        <select id="protocol">
+          <option value="normal">Normal</option>
+          <option value="tor">Tor</option>
+        </select>
+      </div>
 
-    <hr>
+      <hr>
+    </div>
 
     <div id="searx">
       <div id="searx-normal">
@@ -197,33 +200,35 @@
         </form>
         <div class="checklist" id="whoogle-normal-custom-checklist"></div>
       </div>
-    </div>
-
-    <div id="whoogle-tor">
-      <div class="some-block option-block">
-        <h4>Default Instances</h4>
-      </div>
-      <div class="checklist" id="whoogle-tor-checklist">
-      </div>
-      <hr>
-      <div class="some-block option-block">
-        <h4>Custom Instances</h4>
-      </div>
-      <form id="custom-whoogle-tor-instance-form">
+      <div id="whoogle-tor">
         <div class="some-block option-block">
-          <input id="whoogle-tor-custom-instance" placeholder="https://whoogle.com" type="url" />
-          <button type="submit" class="add" id="whoogle-tor-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>Default Instances</h4>
+        </div>
+        <div class="checklist" id="whoogle-tor-checklist">
         </div>
-      </form>
-      <div class="checklist" id="whoogle-tor-custom-checklist"></div>
+        <hr>
+        <div class="some-block option-block">
+          <h4>Custom Instances</h4>
+        </div>
+        <form id="custom-whoogle-tor-instance-form">
+          <div class="some-block option-block">
+            <input id="whoogle-tor-custom-instance" placeholder="https://whoogle.com" type="url" />
+            <button type="submit" class="add" id="whoogle-tor-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" id="whoogle-tor-custom-checklist"></div>
+      </div>
     </div>
     </div>
 
+
+
   </section>
 
 
diff --git a/src/pages/options/search/search.js b/src/pages/options/search/search.js
index e4ce9d6f..57024221 100644
--- a/src/pages/options/search/search.js
+++ b/src/pages/options/search/search.js
@@ -12,13 +12,25 @@ let whoogleDivElement = document.getElementById("whoogle")
 
 
 function changeFrontendsSettings(frontend) {
+  let SearxWhoogleElement = document.getElementById("searx-whoogle");
+  let frontendElement = document.getElementById("frontend");
   if (frontend == 'searx') {
+    frontendElement.innerHTML = 'Frontend';
     searxDivElement.style.display = 'block';
     whoogleDivElement.style.display = 'none';
+    SearxWhoogleElement.style.display = 'block';
   }
   else if (frontend == 'whoogle') {
+    frontendElement.innerHTML = 'Frontend';
     searxDivElement.style.display = 'none';
     whoogleDivElement.style.display = 'block';
+    SearxWhoogleElement.style.display = 'block';
+  }
+  else if (frontend == 'startpage') {
+    frontendElement.innerHTML = `Frontend: <span style="color:red;">This is a centralized service</span>`;
+    searxDivElement.style.display = 'none';
+    whoogleDivElement.style.display = 'none';
+    SearxWhoogleElement.style.display = 'none';
   }
 }
 let searchFrontendElement = document.getElementById("search-frontend");