From 03e1b16961057fcb78543360937fc78da9e776a9 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 8 Jan 2021 13:12:48 -0500 Subject: [PATCH] Fix content script's broken context lookup from sandboxed anonymous frames --- src/js/contentscript.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/contentscript.js b/src/js/contentscript.js index 3ce10096f..6f29027e1 100644 --- a/src/js/contentscript.js +++ b/src/js/contentscript.js @@ -116,7 +116,8 @@ vAPI.contentScript = true; try { while ( context !== self.top && - context.location.href.startsWith('about:blank') + context.location.href.startsWith('about:blank') && + context.parent.location.href ) { context = context.parent; }