aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-20 20:17:31 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-20 20:17:31 +0200
commitcc5f582897211c510cc18851ea6bffc18bf943e4 (patch)
tree368221b0d9b09a4254726ef635a0c55a0da6023c
parent93a22153597349dca7bc607d7288396200fade0c (diff)
downloadbrowser-extension-cc5f582897211c510cc18851ea6bffc18bf943e4.tar.gz
browser-extension-cc5f582897211c510cc18851ea6bffc18bf943e4.zip
make popup always show information about the main frame
-rw-r--r--content/content.js6
1 files 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 {