-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbackground.js
41 lines (41 loc) · 1.23 KB
/
background.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
29
30
31
32
33
34
35
36
37
38
39
40
41
chrome.runtime.onInstalled.addListener(function() {
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [
"gamepad-tester.com",
"gamepad.e7d.io",
"cloud.boosteroid.com",
"www.xbox.com",
"play.geforcenow.com",
"shadow.tech",
"www.paperspace.com",
"parsec.app",
"www.nvidia.com",
"playkey.net",
"www.netboom.com",
"www.blacknut.com",
"www.furioos.com",
"luna.amazon.com",
"stadia.google.com"
].map(hostEquals => (
[new chrome.declarativeContent.PageStateMatcher({
pageUrl: {hostEquals},
})]
)),
actions: [new chrome.declarativeContent.ShowPageAction()]
}]);
});
const startParams = {
"firstRun": true
};
chrome.storage.sync.get([
"firstRun"
], function(settings) {
for(const key of Object.keys(settings)){
startParams[key] = settings[key];
}
chrome.storage.sync.set(startParams, function() {
console.log("ControlStadia: Set start params!");
});
});
});