aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-17 23:09:55 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-18 23:28:00 +0300
commit4fdc300b61ebc3d36c3f5a511df92248453f8d55 (patch)
treefd40343de26a5267e3dd71bda5141784e5a20233 /ext/fg
parent5b3d7fadc3534ba27eee971dac4ba5ee475c4e3d (diff)
disable root frame popup when iframe is fullscreen
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frontend-initialize.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index 2b942258..83c0e606 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -88,7 +88,7 @@ async function main() {
}
let popup;
- if (isIframe && options.general.showIframePopupsInRootFrame) {
+ if (isIframe && options.general.showIframePopupsInRootFrame && !document.fullscreen) {
popup = popups.iframe || await createIframePopupProxy(url, frameOffsetForwarder);
popups.iframe = popup;
} else if (proxy) {
@@ -117,6 +117,7 @@ async function main() {
};
yomichan.on('optionsUpdated', applyOptions);
+ window.addEventListener('fullscreenchange', applyOptions, false);
await applyOptions();
}