From 1ec5d2300bf83cd95ea9f72f23958459e9a5bb92 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 20 Mar 2023 23:37:11 +0100 Subject: [PATCH] Generalized prompt safety hooks. --- src/bg/main.js | 8 ++++++++ src/nscl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bg/main.js b/src/bg/main.js index be34628..7e3c883 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -229,6 +229,14 @@ reader.readAsDataURL(blob); }); }, + + async promptHook(msg, {tabId}) { + await browser.tabs.executeScript(tabId, { + code: "try { if (document.fullscreenElement) document.exitFullscreen(); } catch (e) {}", + matchAboutBlank: true, + allFrames: true, + }); + } }; function onSyncMessage(msg, sender) { diff --git a/src/nscl b/src/nscl index 3d3ebed..0d4cbf9 160000 --- a/src/nscl +++ b/src/nscl @@ -1 +1 @@ -Subproject commit 3d3ebed08fe4e23813934935b26019d572915156 +Subproject commit 0d4cbf9c41b0a636c003fb8c94d2316f969e8be1