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 => { return new Promise(async resolve => {
options = await utils.getOptions() options = await utils.getOptions()
config = await utils.getConfig() config = await utils.getConfig()
// await sendEnabledFrontends()
resolve() resolve()
}) })
} }
@ -17,19 +16,6 @@ function init() {
init() init()
browser.storage.onChanged.addListener(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) { function all(service, frontend, options, config) {
let instances = [] let instances = []
if (!frontend) { if (!frontend) {
@ -675,6 +661,8 @@ function reverse(url) {
case "twitter": case "twitter":
case "reddit": case "reddit":
case "imdb": case "imdb":
case "snopes":
case "urbanDictionary":
case "quora": case "quora":
case "medium": case "medium":
resolve(config.services[service].url + url.pathname + url.search) resolve(config.services[service].url + url.pathname + url.search)