aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-06-21 15:52:43 -0400
committerGitHub <noreply@github.com>2020-06-21 15:52:43 -0400
commit3db7b3a92569e2789776480e776f454d084091d9 (patch)
treecd3b3f00ecd1941758b04e4ac4bdf85bab77e63e /ext/fg/js
parent9e28db6ef7df990ee035b5e191727f8c0d3d3139 (diff)
Add option to use the unsecure frame URL (#618)
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/popup.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index a8188143..af24989f 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -328,12 +328,18 @@ class Popup {
async _createInjectPromise() {
this._injectStyles();
+ const unsecurePopupFrameUrl = (this._options !== null && this._options.general.unsecurePopupFrameUrl);
const {secret, token} = await this._initializeFrame(this._frame, this._targetOrigin, this._frameId, (frame) => {
frame.removeAttribute('src');
frame.removeAttribute('srcdoc');
this._observeFullscreen(true);
this._onFullscreenChanged();
- frame.contentDocument.location.href = chrome.runtime.getURL('/fg/float.html');
+ const url = chrome.runtime.getURL('/fg/float.html');
+ if (unsecurePopupFrameUrl) {
+ frame.setAttribute('src', url);
+ } else {
+ frame.contentDocument.location.href = url;
+ }
});
this._frameSecret = secret;
this._frameToken = token;