-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbackground.js
More file actions
20 lines (16 loc) · 819 Bytes
/
background.js
File metadata and controls
20 lines (16 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(null,
{code: "var link = location.href;" +
"if (link.includes('ReportSection')){ alert('Entrando em modo apresentação!'); location.reload() } else {alert('Não foi possível entrar no modo exibição.')};var lucar=5"});
});
chrome.runtime.onInstalled.addListener(function() {
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { urlContains: 'app.powerbi' },
}) ],
actions: [ new chrome.declarativeContent.ShowPageAction() ]
}]);
});
});