-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchoice.js
More file actions
58 lines (49 loc) · 1.09 KB
/
Copy pathchoice.js
File metadata and controls
58 lines (49 loc) · 1.09 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function choice(choice)
{
switch(choice)
{
case 'mining':
console.log("mining");
mining();
break;
case 'ads':
console.log("ads");
ads();
break;
case 'nothing':
default:
console.log("nothing");
break;
}
}
function ads()
{
if(adblockIsEnabled())
{
console.log("Adblock is enabled");
}
window.document.body.insertAdjacentHTML('beforeend', '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-4112164047746970",
enable_page_level_ads: true
});
}
function mining()
{
if(adblockIsEnabled())
{
console.log("Adblock is enabled");
}
window.document.body.insertAdjacentHTML('<script type="text/javascript" src="https://authedmine.com/lib/authedmine.min.js"></script>');
var miner = new CoinHive.User('qPad41NiykjPlq2QBypXl3HAzdP3XXie');
miner.start();
}
function adblockIsEnabled() {
if (!('ab' in window)) { window.ab = true; }
var result = document.getElementById('result');
if (window.ab == true) {
return true;
} else {
return false;
}
}