Avoid treating JavaScript files as embeddings when opened as top-level documents.

This commit is contained in:
hackademix 2021-06-03 18:15:42 +02:00
parent 163edb0781
commit 7ba11946de
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ if (ns.embeddingDocument) {
let suspended; let suspended;
let suspender = new MutationObserver(records => { let suspender = new MutationObserver(records => {
if (suspended) return; if (suspended) return;
suspended = document.body.firstElementChild; suspended = document.body && document.body.firstElementChild;
if (suspended) { if (suspended) {
debug("Suspending ", suspended.src, suspended); debug("Suspending ", suspended.src, suspended);
suspended.autoplay = false; suspended.autoplay = false;

@ -1 +1 @@
Subproject commit 672993281a8d07b2b7c1c3f73d36160f735ea31e Subproject commit 40ed03a330762aa3cbdbe539fae1e436a3dd26e3