Skip to content

Commit

Permalink
[refactor]: remove unused permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfalade committed Oct 12, 2020
1 parent 43c6e52 commit 9f8a5ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"32": "images/logo-32x32.png"
},
"permissions": [
"https://github.com/*",
"declarativeContent",
"activeTab",
"webNavigation",
"storage"
],
Expand Down
15 changes: 0 additions & 15 deletions src/background/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
const GITHUB_URL = 'https://github.com';

chrome.runtime.onInstalled.addListener(() => {
chrome.declarativeContent.onPageChanged.removeRules(undefined, () => {
chrome.declarativeContent.onPageChanged.addRules([
{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { urlMatches: GITHUB_URL },
}),
],
actions: [new chrome.declarativeContent.ShowPageAction()],
},
]);
});
});

chrome.webNavigation.onHistoryStateUpdated.addListener(({ url }) => {
if (url.includes(GITHUB_URL)) {
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
Expand Down

0 comments on commit 9f8a5ef

Please sign in to comment.