aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options/search
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-03-10 10:57:10 +0300
committerManeraKai <manerakai@protonmail.com>2022-03-10 10:57:10 +0300
commit519f9e959476e01670c9b2afc2e3b042879d4f8a (patch)
treeb49713e0af2d8089cccf45b760eaacb66063176a /src/pages/options/search
parentAdded send, fixed a bug in #89 (diff)
downloadlibredirect-519f9e959476e01670c9b2afc2e3b042879d4f8a.zip
Added startpage #52
Diffstat (limited to 'src/pages/options/search')
-rw-r--r--src/pages/options/search/search.html67
-rw-r--r--src/pages/options/search/search.js12
2 files changed, 48 insertions, 31 deletions
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");