diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-09-20 20:17:31 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-20 20:17:31 +0200 |
commit | cc5f582897211c510cc18851ea6bffc18bf943e4 (patch) | |
tree | 368221b0d9b09a4254726ef635a0c55a0da6023c /content | |
parent | 93a22153597349dca7bc607d7288396200fade0c (diff) | |
download | browser-extension-cc5f582897211c510cc18851ea6bffc18bf943e4.tar.gz browser-extension-cc5f582897211c510cc18851ea6bffc18bf943e4.zip |
make popup always show information about the main frame
Diffstat (limited to 'content')
-rw-r--r-- | content/content.js | 6 |
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 { |