summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index d378dd61..9c511d8a 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -42,14 +42,20 @@ class Frontend {
const isNested = (currentUrl === floatUrl);
let id = null;
+ let parentFrameId = null;
if (isNested) {
- const match = /[&?]id=([^&]*?)(?:&|$)/.exec(location.href);
+ let match = /[&?]id=([^&]*?)(?:&|$)/.exec(location.href);
if (match !== null) {
id = match[1];
}
+
+ match = /[&?]parent=(\d+)(?:&|$)/.exec(location.href);
+ if (match !== null) {
+ parentFrameId = parseInt(match[1], 10);
+ }
}
- const popup = isNested ? new PopupProxy(id) : PopupProxyHost.instance.createPopup();
+ const popup = isNested ? new PopupProxy(id, parentFrameId) : PopupProxyHost.instance.createPopup(null);
const frontend = new Frontend(popup);
frontend.prepare();
return frontend;