From 3d883f52ab03f0fa2d0d650aa3a3789fb326c6ad Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Tue, 20 Jun 2023 11:20:32 +0300 Subject: Added Indestructables https://codeberg.org/LibRedirect/browser_extension/issues/91 . Fixed bugs in embedFrontend https://github.com/libredirect/browser_extension/issues/624 --- src/assets/javascripts/services.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'src/assets/javascripts') diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 3ff11594..4613d34f 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -56,26 +56,20 @@ function redirect(url, type, initiator, forceRedirection) { for (const service in config.services) { if (!forceRedirection && !options[service].enabled) continue - frontend = options[service] + frontend = options[service].frontend + if ( config.services[service].embeddable && - type != options[service].redirectType && - options[service].redirectType != "both" + type != options[service].redirectType && options[service].redirectType != "both" ) { if (options[service].unsupportedUrls == 'block') return 'CANCEL' return } - if ( - config.services[service].embeddable - && - type != "main_frame" - && - options[service].redirectType != "main_frame" - && - options[service].embedFrontend != "disabled" - ) frontend = options[service].embedFrontend - + if (config.services[service].frontends[frontend].desktopApp && type != "main_frame" && options[service].redirectType != "main_frame") + frontend = options[service].embedFrontend + + if (!regexArray(service, url, config, frontend)) { frontend = null continue @@ -729,7 +723,8 @@ const defaultInstances = { "libreSpeed": ['https://librespeed.org'], 'jitsi': ['https://meet.jit.si', 'https://8x8.vc'], 'binternet': ['https://binternet.ahwx.org'], - 'pixivFe': ['https://pixivfe.exozy.me'] + 'pixivFe': ['https://pixivfe.exozy.me'], + 'indestructables': ['https://indestructables.private.coffee'] } function initDefaults() { -- cgit 1.4.1