-
Notifications
You must be signed in to change notification settings - Fork 1
/
bookmarklet
53 lines (40 loc) · 1.98 KB
/
bookmarklet
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
javascript:(function() {
var pattern = new RegExp("_aid-");
var pattern_login = new RegExp("imgs");
var website_links = document.getElementsByTagName("a");
var ads = document.getElementsByTagName("aside");
var eyediv = document.getElementById("eyeDiv");
var fullads = document.getElementsByClassName("park-fakebody")[0];
var fulladsdiv = document.getElementById("animation_container");
var fulladscanvas = document.getElementById("omsv_sky_DhtmlLayer");
var new_link = "";
for (var i = 0; i < ads.length; i++) {
ads[i].setAttribute("style", ads[i].getAttribute("style") + "display: none;");
}
for (var i = 0; i < website_links.length; i++) {
var link = website_links[i].getAttribute("href").split("?")[0];
if (link.match(pattern)) {
website_links[i].setAttribute("href", link + "?utm_medium=instant-message");
new_link = link + "?utm_medium=instant-message";
} else if (link.match(pattern_login) && !window.location.href.includes("instant-message")) {
document.getElementsByClassName("park-article__headline")[0].innerHTML = "Click on Image to decrypt!";
document.getElementsByClassName("park-article__headline")[0].style.backgroundColor = "red";
document.getElementsByClassName("park-article__headline")[0].style.color = "white";
website_links[i].setAttribute("href", window.location.href.split("?")[0] + "?utm_medium=instant-message");
website_links[i].removeAttribute("target");
}
}
if (eyediv) {
eyediv.setAttribute("style", eyediv.getAttribute("style") + "display: none;");
}
if (fullads) {
fullads.setAttribute("style", fullads.getAttribute("style") + "background-image: none;");
}
if (fulladsdiv) {
fulladsdiv.setAttribute("style", fulladsdiv.getAttribute("style") + "display: none;");
}
if (fulladscanvas) {
fulladscanvas.setAttribute("style", fulladscanvas.getAttribute("style") + "display: none;");
}
}
)();