From cc5f582897211c510cc18851ea6bffc18bf943e4 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 20 Sep 2022 20:17:31 +0200 Subject: make popup always show information about the main frame --- content/content.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/content.js b/content/content.js index 998ff49..fee0860 100644 --- a/content/content.js +++ b/content/content.js @@ -99,8 +99,10 @@ async function main() { if (is_privileged_url(document.URL)) return; - browser.runtime.onMessage.addListener(on_page_info_request); - repo_query_cacher.start(); + if (window.top === window) { + browser.runtime.onMessage.addListener(on_page_info_request); + repo_query_cacher.start(); + } #IF MOZILLA || MV3 try { -- cgit v1.2.3