-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuserscript.user.js
46 lines (42 loc) · 1.86 KB
/
userscript.user.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
42
43
44
45
46
// ==UserScript==
// @name Portugal Overlay
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Orgulho tuga!
// @author Some anon
// @match https://hot-potato.reddit.com/embed*
// @icon https://i.pinimg.com/originals/bb/28/f0/bb28f08db88265208c7329474998d8a5.png
// @grant none
// ==/UserScript==
if (window.top !== window.self) {
window.addEventListener('load', () => {
document.getElementsByTagName("mona-lisa-embed")[0].shadowRoot.children[0].getElementsByTagName("mona-lisa-canvas")[0].shadowRoot.children[0].appendChild(
(function () {
const i = document.createElement("img");
i.src = "https://raw.githubusercontent.com/AsumaPT/draconBot/main/canvas_pt.png";
i.style = "position: absolute;left: 0;top: 0px;image-rendering: pixelated;width: 2000px;height: 1000px";
i.id = "mcss-overlay"
i.setAttribute("vis",1)
console.log(i);
return i;
})())
document.getElementsByTagName("body")[0].appendChild(
(function () {
const i = document.createElement("button");
i.style = "position: fixed;left: 10px; background: #fff; top: 50%;width: 50px;height: 50px;";
i.innerHTML = "T"
i.onclick = function() {
const img = document.getElementsByTagName("mona-lisa-embed")[0].shadowRoot.children[0].getElementsByTagName("mona-lisa-canvas")[0].shadowRoot.querySelector("#mcss-overlay")
if (img.getAttribute("vis") == "1") {
img.setAttribute("vis",0)
img.style.opacity = 0
} else {
img.setAttribute("vis",1)
img.style.opacity = 1
}
}
console.log(i);
return i;
})())
}, false);
}