aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/popup-preview-controller.js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-06-20 12:03:17 -0400
committerGitHub <noreply@github.com>2024-06-20 16:03:17 +0000
commit9f4e595c7264a52ab85eb07c4d1411e4efb09ab1 (patch)
tree55f8ea5fec49801915174dd92367032c47a8c149 /ext/js/pages/settings/popup-preview-controller.js
parent171722966cc8d2057c23fbbb454b3aa16897c492 (diff)
Fix settings display when shadow is on auto and body is light or dark (#1089)
Diffstat (limited to 'ext/js/pages/settings/popup-preview-controller.js')
-rw-r--r--ext/js/pages/settings/popup-preview-controller.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/js/pages/settings/popup-preview-controller.js b/ext/js/pages/settings/popup-preview-controller.js
index 4a09d169..da163a6a 100644
--- a/ext/js/pages/settings/popup-preview-controller.js
+++ b/ext/js/pages/settings/popup-preview-controller.js
@@ -112,3 +112,11 @@ export class PopupPreviewController {
this._frame.contentWindow.postMessage({action, params}, this._targetOrigin);
}
}
+
+/**
+ * @param {string | undefined} url
+ * @returns {boolean}
+ */
+export function checkPopupPreviewURL(url) {
+ return !!(url && url.includes('popup-preview.html') && !['http:', 'https:', 'ws:', 'wss:', 'ftp:', 'data:', 'file:'].includes(new URL(url).protocol));
+}