diff options
Diffstat (limited to 'src/assets')
-rw-r--r-- | src/assets/javascripts/services.js | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 412c044a..3ff11594 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -56,22 +56,31 @@ function redirect(url, type, initiator, forceRedirection) { for (const service in config.services) { if (!forceRedirection && !options[service].enabled) continue - frontend = options[service].frontend - - if (!regexArray(service, url, config, frontend)) { - frontend = null - continue - } - + frontend = options[service] if ( - (config.services[service].embeddable && type != options[service].redirectType && options[service].redirectType != "both") - || - (!config.services[service].embeddable && type != "main_frame") + config.services[service].embeddable && + 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 (!regexArray(service, url, config, frontend)) { + frontend = null + continue + } + let instanceList = options[frontend] if (instanceList === undefined) break if (instanceList.length === 0) return null |