summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-initialize.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-10 15:49:56 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-11 21:04:30 +0300
commit565e3a8c6ad31afa0ddb171ac5a33b6b84e5c3dc (patch)
tree965d5d3b29cb45df2d9c3dbabf0de9811372e682 /ext/fg/js/frontend-initialize.js
parentb9035854b2b45979c16f8733bb66993f6ce044fe (diff)
change iframe popup live
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();