-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbackground.js
More file actions
21 lines (21 loc) · 738 Bytes
/
background.js
File metadata and controls
21 lines (21 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
chrome.runtime.onInstalled.addListener(function() {
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: {
urlContains: 'npmjs.com/package/'
},
}),
new chrome.declarativeContent.PageStateMatcher({
pageUrl: {
urlContains: 'github.com'
},
})
],
actions: [
new chrome.declarativeContent.ShowPageAction()
]
}]);
});
});