-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbackground.js
38 lines (33 loc) · 1.25 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
chrome.browserAction.onClicked.addListener((tab) => {
chrome.windows.create({ 'url': 'popup.html', 'type': 'popup', 'width': 420, 'height': 280 }, function (window) {
});
});
chrome.browserAction.setTitle({
title: 'Open a Scanner'
});
let filters = "gay|lgbt|nightclub|cabaret|bar|mortgage|wine|military|defense|cannabi|alcohol|weapon|meat|pork|bank|gambling|insurance|tobacco|adult|sex|bonds|movie|shows|streaming|music|food|real estate investment|financial services|equity investment|beverage|general retailer|casino|marijuana";
chrome.storage.sync.get(['firstAcess', 'version1p2p7'], function (arg) {
if (typeof arg.firstAcess === 'undefined') {
chrome.storage.sync.set({firstAcess:false});
setDefaultVariables();
}
console.log(`arg.version1p2p7:`,arg.version1p2p7);
if (typeof arg.version1p2p7 === 'undefined') {
chrome.storage.sync.set({
version1p2p7:false,
filters:filters,
isBatchMode:false
});
}
});
function setDefaultVariables(){
chrome.storage.sync.set({
fontSize:11,
darkMode:true,
market:"US",
totalDebtToAssetsMax:33.33,
cashAndReceivablesToAssetsMax:80,
filters:filters,
isBatchMode:false
});
}