summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend-initialize.js')
-rw-r--r--ext/fg/js/frontend-initialize.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 2cfb6176..ce1a6bf6 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -86,10 +86,6 @@ async function main() {
const applyOptions = async () => {
const optionsContext = {depth: isSearchPage ? 0 : depth, url};
const options = await apiOptionsGet(optionsContext);
- if (isSearchPage) {
- const disabled = !options.scanning.enableOnSearchPage;
- initEventDispatcher.trigger('setDisabledOverride', {disabled});
- }
let popup;
if (isIframe && options.general.showIframePopupsInRootFrame) {
@@ -103,6 +99,15 @@ async function main() {
popups.normal = popup;
}
+ if (isSearchPage) {
+ const disabled = !options.scanning.enableOnSearchPage;
+ initEventDispatcher.trigger('setDisabledOverride', {disabled});
+ }
+
+ if (isIframe) {
+ initEventDispatcher.trigger('popupChange', {popup});
+ }
+
if (frontend === null) {
frontend = new Frontend(popup, initEventDispatcher);
await frontend.prepare();