Added Redirect To Original for Suds And Urban Dictionary

This commit is contained in:
ManeraKai 2023-05-28 09:00:35 +03:00
parent f93de9220c
commit 649e83b77f
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 2 additions and 14 deletions

View File

@ -9,7 +9,6 @@ function init() {
return new Promise(async resolve => {
options = await utils.getOptions()
config = await utils.getConfig()
// await sendEnabledFrontends()
resolve()
})
}
@ -17,19 +16,6 @@ function init() {
init()
browser.storage.onChanged.addListener(init)
function sendEnabledFrontends() {
let enabledFrontends = []
if (options) {
for (const service in config.services) {
if (!options[service].enabled) continue
enabledFrontends.push(options[service].frontend)
}
var port = browser.runtime.connectNative("org.libredirect.stdin_parser");
port.postMessage(JSON.stringify(enabledFrontends));
port.disconnect()
}
}
function all(service, frontend, options, config) {
let instances = []
if (!frontend) {
@ -675,6 +661,8 @@ function reverse(url) {
case "twitter":
case "reddit":
case "imdb":
case "snopes":
case "urbanDictionary":
case "quora":
case "medium":
resolve(config.services[service].url + url.pathname + url.search)