diff options
Diffstat (limited to 'ext/fg/js')
| -rw-r--r-- | ext/fg/js/popup-nested.js | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/ext/fg/js/popup-nested.js b/ext/fg/js/popup-nested.js index f193aa36..3ecdf50c 100644 --- a/ext/fg/js/popup-nested.js +++ b/ext/fg/js/popup-nested.js @@ -44,15 +44,24 @@ async function popupNestedInitialize(id, depth, parentFrameId, url) {      }      popupNestedInitialized = true; +    let optionsApplied = false; +      const applyOptions = async () => {          const optionsContext = {depth, url};          const options = await apiOptionsGet(optionsContext);          const popupNestingMaxDepth = options.scanning.popupNestingMaxDepth; -        if (!(typeof popupNestingMaxDepth === 'number' && typeof depth === 'number' && depth < popupNestingMaxDepth)) { +        const maxPopupDepthExceeded = !( +            typeof popupNestingMaxDepth === 'number' && +            typeof depth === 'number' && +            depth < popupNestingMaxDepth +        ); +        if (maxPopupDepthExceeded || optionsApplied) {              return;          } +        optionsApplied = true; +          window.frontendInitializationData = {id, depth, parentFrameId, url, proxy: true};          injectPopupNested(); |