about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/assets/javascripts/services.js25
-rw-r--r--src/config.json7
-rw-r--r--src/manifest.json2
-rw-r--r--src/pages/options/index.js1
-rw-r--r--src/updates/updates.xml2
5 files changed, 20 insertions, 17 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index b9937d37..99ecfdce 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -9,6 +9,7 @@ function init() {
 	return new Promise(async resolve => {
 		options = await utils.getOptions()
 		config = await utils.getConfig()
+		// await sendEnabledFrontends()
 		resolve()
 	})
 }
@@ -16,16 +17,18 @@ function init() {
 init()
 browser.storage.onChanged.addListener(init)
 
-// function sendEnabledFrontends() {
-// 	return new Promise(resolve => {
-// 		console.log('sendEnabledFrontends')
-// 		let enabledFrontends = []
-// 		for (const service in config.services) {
-// 			if (!options[service].enabled) continue
-// 			enabledFrontends.push(options[service].frontend)
-// 		}
-// 	})
-// }
+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 = []
@@ -43,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))
 		)
diff --git a/src/config.json b/src/config.json
index 013a6d2a..90b55f96 100644
--- a/src/config.json
+++ b/src/config.json
@@ -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",
diff --git a/src/manifest.json b/src/manifest.json
index 185a5231..f97ba5a4 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,7 +1,7 @@
 {
 	"name": "__MSG_extensionName__",
 	"description": "__MSG_extensionDescription__",
-	"version": "2.5.4",
+	"version": "2.6.0",
 	"manifest_version": 2,
 	"browser_specific_settings": {
 		"gecko": {
diff --git a/src/pages/options/index.js b/src/pages/options/index.js
index e589e93d..002a8aa6 100644
--- a/src/pages/options/index.js
+++ b/src/pages/options/index.js
@@ -85,7 +85,6 @@ async function loadPage(path) {
 	}
 
 	for (const service in config.services) {
-		console.log(service, options[service].enabled)
 		if (options[service].enabled) {
 			document.getElementById(`${service}-link`).style.opacity = 1
 		} else {
diff --git a/src/updates/updates.xml b/src/updates/updates.xml
index 77ad2de0..b17800cf 100644
--- a/src/updates/updates.xml
+++ b/src/updates/updates.xml
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
     <app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
-        <updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.5.4/libredirect-2.5.4.crx' version='2.5.4' />
+        <updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.6.0/libredirect-2.6.0.crx' version='2.6.0' />
     </app>
 </gupdate>