-
Notifications
You must be signed in to change notification settings - Fork 1
/
event_page.js
executable file
·28 lines (26 loc) · 983 Bytes
/
event_page.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
chrome.runtime.onInstalled.addListener(function() {
// Replace all rules ...
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
// With a new rule ...
chrome.declarativeContent.onPageChanged.addRules([
{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: 'manage.webconnex.com',
pathContains: 'reports/orders/'},
}),
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: 'manage.webconnex.com',
pathContains: 'reports/registrants/'},
})
],
actions: [ new chrome.declarativeContent.ShowPageAction() ]
}
]);
});
});
chrome.pageAction.onClicked.addListener(function() {
chrome.tabs.executeScript(null, {file: "jquery-3.1.1.min.js"}, function() {
chrome.tabs.executeScript(null, {file:"content_script.js"})
});
});