forked from PicolotoLF/SlideShowPowerBI
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbackground.js
More file actions
24 lines (22 loc) · 815 Bytes
/
background.js
File metadata and controls
24 lines (22 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
chrome.runtime.onInstalled.addListener(function() {
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: 'app.powerbi.com', pathContains: 'ReportSection' },
}) ],
actions: [ new chrome.declarativeContent.ShowPageAction() ]
}]);
});
});
chrome.runtime.onMessage.addListener(
function(request) {
if (request.execute === "start" || request.execute === "stop") {
chrome.tabs.executeScript(null,
{
code: "location.reload()"
}
);
}
}
)