aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-05 01:43:12 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-05 20:03:42 +0300
commit31a326fe636683e71fa61f11ed25b4f2adaead44 (patch)
tree61a7d64c0c03a91c2bb02ccdd635b9fabd419387 /ext/fg
parent0d76cef43437fda336a3314dc62db1388537042f (diff)
add option for iframe popups
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frontend-initialize.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 2f86f5c8..4a1409db 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -22,6 +22,7 @@
* PopupProxy
* PopupProxyHost
* apiForward
+ * apiOptionsGet
*/
async function main() {
@@ -30,8 +31,11 @@ async function main() {
const data = window.frontendInitializationData || {};
const {id, depth=0, parentFrameId, url, proxy=false} = data;
+ const optionsContext = {depth, url};
+ const options = await apiOptionsGet(optionsContext);
+
let popup;
- if (!proxy && (window !== window.parent)) {
+ if (!proxy && (window !== window.parent) && options.general.showIframePopupsInRootFrame) {
const rootPopupInformationPromise = yomichan.getTemporaryListenerResult(
chrome.runtime.onMessage,
({action, params}, {resolve}) => {