Removed startpage as it has an extension #222
This commit is contained in:
parent
cf1b632529
commit
0e817629d3
|
@ -13,12 +13,11 @@ body.option(dir="auto")
|
|||
input#disable-search(type="checkbox")
|
||||
|
||||
.some-block.option-block
|
||||
h4#frontend(data-localise="__MSG_frontend__") Frontend
|
||||
h4(data-localise="__MSG_frontend__") Frontend
|
||||
select#search-frontend
|
||||
option(value="searx") SearX
|
||||
option(value="searxng") SearXNG
|
||||
option(value="searx") SearX
|
||||
option(value="whoogle") Whoogle
|
||||
option(value="startpage") Startpage
|
||||
|
||||
|
||||
#searx-whoogle
|
||||
|
|
|
@ -25,10 +25,7 @@ let redirects = {
|
|||
"normal": [],
|
||||
"tor": [],
|
||||
"i2p": []
|
||||
},
|
||||
"startpage": {
|
||||
"normal": "https://www.startpage.com",
|
||||
},
|
||||
}
|
||||
};
|
||||
const getRedirects = () => redirects;
|
||||
const getCustomRedirects = () => {
|
||||
|
@ -430,10 +427,7 @@ function redirect(url) {
|
|||
randomInstance = commonHelper.getRandomInstance(instancesList)
|
||||
path = "/search";
|
||||
}
|
||||
else if (frontend == 'startpage') {
|
||||
randomInstance = redirects.startpage.normal;
|
||||
path = "/do/search";
|
||||
}
|
||||
|
||||
if (
|
||||
((url.hostname.includes('google') || url.hostname.includes('bing')) && !url.searchParams.has('q')) ||
|
||||
(url.hostname.includes('yandex') && !url.searchParams.has('text'))
|
||||
|
|
|
@ -174,7 +174,6 @@ async function initDefaults() {
|
|||
|
||||
async function init() {
|
||||
return new Promise(resolve => {
|
||||
console.log('redirects', redirects)
|
||||
browser.storage.local.get(
|
||||
[
|
||||
"disableTiktok",
|
||||
|
|
|
@ -63,12 +63,11 @@
|
|||
<input id="disable-search" type="checkbox">
|
||||
</div>
|
||||
<div class="some-block option-block">
|
||||
<h4 id="frontend" data-localise="__MSG_frontend__">Frontend</h4>
|
||||
<h4 data-localise="__MSG_frontend__">Frontend</h4>
|
||||
<select id="search-frontend">
|
||||
<option value="searx">SearX</option>
|
||||
<option value="searxng">SearXNG</option>
|
||||
<option value="searx">SearX</option>
|
||||
<option value="whoogle">Whoogle</option>
|
||||
<option value="startpage">Startpage</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="searx-whoogle">
|
||||
|
|
|
@ -12,35 +12,24 @@ 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';
|
||||
searxngDivElement.style.display = 'none';
|
||||
whoogleDivElement.style.display = 'none';
|
||||
SearxWhoogleElement.style.display = 'block';
|
||||
}
|
||||
else if (frontend == 'searxng') {
|
||||
frontendElement.innerHTML = 'Frontend';
|
||||
searxDivElement.style.display = 'none';
|
||||
searxngDivElement.style.display = 'block';
|
||||
whoogleDivElement.style.display = 'none';
|
||||
SearxWhoogleElement.style.display = 'block';
|
||||
}
|
||||
else if (frontend == 'whoogle') {
|
||||
frontendElement.innerHTML = 'Frontend';
|
||||
searxDivElement.style.display = 'none';
|
||||
searxngDivElement.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';
|
||||
searxngDivElement.style.display = 'none';
|
||||
whoogleDivElement.style.display = 'none';
|
||||
SearxWhoogleElement.style.display = 'none';
|
||||
}
|
||||
}
|
||||
let searchFrontendElement = document.getElementById("search-frontend");
|
||||
searchFrontendElement.addEventListener("change",
|
||||
|
|
Loading…
Reference in New Issue