From 70bc5d910b870122a9e5d0d9bbfd58add94b9b93 Mon Sep 17 00:00:00 2001 From: Kate Higa Date: Fri, 11 Feb 2022 20:12:42 -0800 Subject: [PATCH] Don't attempt to run background.js on non-GitHub sites --- background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index df9734b..1158aa5 100644 --- a/background.js +++ b/background.js @@ -1,3 +1,3 @@ chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) { - chrome.tabs.executeScript(details.tabId,{file:"contentScript.js"}); -}); + chrome.tabs.executeScript(details.tabId,{file:"contentScript.js"}); +}, {url: [{hostContains: 'github'}]});