Small fixes
This commit is contained in:
parent
12dd59e290
commit
229630d345
|
@ -9,7 +9,7 @@ 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()
|
// await sendEnabledFrontends()
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,10 @@ function sendEnabledFrontends() {
|
||||||
if (!options[service].enabled) continue
|
if (!options[service].enabled) continue
|
||||||
enabledFrontends.push(options[service].frontend)
|
enabledFrontends.push(options[service].frontend)
|
||||||
}
|
}
|
||||||
if (enabledFrontends.length > 0) {
|
|
||||||
var port = browser.runtime.connectNative("org.libredirect.stdin_parser");
|
var port = browser.runtime.connectNative("org.libredirect.stdin_parser");
|
||||||
port.postMessage(enabledFrontends);
|
port.postMessage(JSON.stringify(enabledFrontends));
|
||||||
port.disconnect()
|
port.disconnect()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function all(service, frontend, options, config) {
|
function all(service, frontend, options, config) {
|
||||||
|
@ -48,7 +46,7 @@ function all(service, frontend, options, config) {
|
||||||
|
|
||||||
function regexArray(service, url, config, frontend) {
|
function regexArray(service, url, config, frontend) {
|
||||||
let targetList = config.services[service].targets
|
let targetList = config.services[service].targets
|
||||||
if (frontend && config.services[service].frontends[frontend].excludeTargets) {
|
if (frontend && 'excludeTargets' in config.services[service].frontends[frontend]) {
|
||||||
targetList = targetList.filter(val =>
|
targetList = targetList.filter(val =>
|
||||||
!config.services[service].frontends[frontend].excludeTargets.includes(targetList.indexOf(val))
|
!config.services[service].frontends[frontend].excludeTargets.includes(targetList.indexOf(val))
|
||||||
)
|
)
|
||||||
|
|
|
@ -216,7 +216,8 @@
|
||||||
"name": "rimgo",
|
"name": "rimgo",
|
||||||
"instanceList": true,
|
"instanceList": true,
|
||||||
"url": "https://codeberg.org/video-prize-ranch/rimgo",
|
"url": "https://codeberg.org/video-prize-ranch/rimgo",
|
||||||
"localhost": true
|
"localhost": true,
|
||||||
|
"embeddable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
|
@ -311,7 +312,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}(?:www\\.|m\\.|)imdb\\.com\\/title"
|
"^https?:\\/{2}(?:www\\.|m\\.|)imdb\\.com"
|
||||||
],
|
],
|
||||||
"name": "IMDb",
|
"name": "IMDb",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -765,7 +766,7 @@
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}(www\\.)?wolframalpha\\.com\\/"
|
"^https?:\\/{2}(www\\.)?wolframalpha\\.com\\/"
|
||||||
],
|
],
|
||||||
"name": "WolframAlpha",
|
"name": "Wolfram Alpha",
|
||||||
"options": {
|
"options": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"unsupportedUrls": "bypass",
|
"unsupportedUrls": "bypass",
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
"<all_urls>"
|
"<all_urls>"
|
||||||
],
|
],
|
||||||
"optional_permissions": [
|
"optional_permissions": [
|
||||||
"bookmarks",
|
"bookmarks"
|
||||||
"nativeMessaging"
|
|
||||||
],
|
],
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_title": "__MSG_extensionName__",
|
"default_title": "__MSG_extensionName__",
|
||||||
|
|
Loading…
Reference in New Issue