Added Redirect To Original for Suds And Urban Dictionary
This commit is contained in:
parent
f93de9220c
commit
649e83b77f
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue