Small fixes

This commit is contained in:
ManeraKai 2023-05-21 19:29:45 +03:00
parent 12dd59e290
commit 229630d345
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
3 changed files with 10 additions and 12 deletions

View File

@ -9,7 +9,7 @@ function init() {
return new Promise(async resolve => {
options = await utils.getOptions()
config = await utils.getConfig()
await sendEnabledFrontends()
// await sendEnabledFrontends()
resolve()
})
}
@ -24,11 +24,9 @@ function sendEnabledFrontends() {
if (!options[service].enabled) continue
enabledFrontends.push(options[service].frontend)
}
if (enabledFrontends.length > 0) {
var port = browser.runtime.connectNative("org.libredirect.stdin_parser");
port.postMessage(enabledFrontends);
port.disconnect()
}
var port = browser.runtime.connectNative("org.libredirect.stdin_parser");
port.postMessage(JSON.stringify(enabledFrontends));
port.disconnect()
}
}
@ -48,7 +46,7 @@ function all(service, frontend, options, config) {
function regexArray(service, url, config, frontend) {
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 =>
!config.services[service].frontends[frontend].excludeTargets.includes(targetList.indexOf(val))
)

View File

@ -216,7 +216,8 @@
"name": "rimgo",
"instanceList": true,
"url": "https://codeberg.org/video-prize-ranch/rimgo",
"localhost": true
"localhost": true,
"embeddable": true
}
},
"targets": [
@ -311,7 +312,7 @@
}
},
"targets": [
"^https?:\\/{2}(?:www\\.|m\\.|)imdb\\.com\\/title"
"^https?:\\/{2}(?:www\\.|m\\.|)imdb\\.com"
],
"name": "IMDb",
"options": {
@ -765,7 +766,7 @@
"targets": [
"^https?:\\/{2}(www\\.)?wolframalpha\\.com\\/"
],
"name": "WolframAlpha",
"name": "Wolfram Alpha",
"options": {
"enabled": false,
"unsupportedUrls": "bypass",

View File

@ -28,8 +28,7 @@
"<all_urls>"
],
"optional_permissions": [
"bookmarks",
"nativeMessaging"
"bookmarks"
],
"browser_action": {
"default_title": "__MSG_extensionName__",