-
Notifications
You must be signed in to change notification settings - Fork 1
/
content.js
183 lines (153 loc) · 20.6 KB
/
content.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
;(() => {
if (window.__loadedContent) return
window.__loadedContent = true
const AUDIO_PISTOL = "data:audio/mpeg;base64,UklGRkEWAABXQVZFZm10IBAAAAABAAEAESsAABErAAABAAgAZGF0YR0WAAB+fn5+fn5+fn5+fn5+fn5+fn19fFolEgAAAAAEI3b///vgxsSytKusn5+abBh1vS9W1aydl1qLnis7SVRZXF1MUlVcXmBkYmJmampsa2xwb3JxcnV1lv/w1c3Cw7q5s7CqqqWkoqOenZmbmZaVlpOUkI2Njo6NiYqKiYmKhYaGg4SAc11kkIZqAgAGHS0sLj1bLT5ER05PVFNVWl1dYWJjZWpzm9/JoauIo8WwlnRMS1deaGl+kHdrYWZ0i4VzZHSPiGxtdXZ5eXl9gHuAf4GGv/7SuYdnbYGOfZmZz/zD0dfGhGB1j/95YL6FpNXZvXb/dqwhpR2kPfiS9nPWrcV2nIX1t7t6lle+tqF1uJybcDUEFyAnLTUjQDZONDIzREU/VVxjbH2Jc2J3xqeVkI+MrrKy4KutmICOSlpqZWmdfl1aT0lFUFU4Y29jbXZlm97v0cKlV3CzmWBlam1yd3prcXKgqF9xZWhWAGClV4p2agARRK6UaQMkfqyei49/JlRFNG2OtrS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1/gIKCgoGBgIB/fn5+f39/fn+Af3x6dnV2dnh7fH19fHt5eXl7fH6AgoKCg4OCgoSEhISCgH56eHp9f358e3yAhIiGgHx7fYCChIOBgYKEhYWFhIODhIaGhYSDgX9/gH+Af3t4d3d5enl7enp6enl5eHp6fHp6enp6fHx/f4B/gICAgICAgYCBgIB/fXt8fX58fHt7e3p6fH5+f4CAgICBgICBgYGCgoKChIWGhYKCg4ODgoKCgoKCgYKCgYGAgICAf39/fn18ent7enh3d3Z2dnd5e3x8e3t7fHt9f4B/fX59fXx7e3x9fHt6eXl7fHx9fXx9f4CAgICAgICBgoKCg4WFiIiJh4aGhYSFhoaGhoSBgIB/fn5/f39/gH9+f358fH19fX1/gICAf319fHx7eXh4d3h4d3Z1dXR1d3h4ent8fX19fX6AgICAgYOFh4mJiIeGh4iHhoWFhYODg4KAgH98fHx9fX19e3t6eXl4eHh5ent7enx8fX5+f39+fn5+fn5/f4CAgICAgICAgIGBgICAf35+fn5/gICAgYGBgYCAgIB/gH+AgICAgYB+fH1+f39/f35+fn5+fHt6enp7e3p6enp4d3Z2d3h6eXl5eXt8fH5+f35/gICBgoOEhISDg4SEhYSEg4KCgoGBgYGBgYCAgICAf35+fn19f39/gICAgH59fX18e3p7e3x8fX1/gICAgICAgICAgICAgIGDhIWEg4KBgYCBgICAgICAfnx8fHx9fXp4d3V1dnl6enp5eXp7fH1+fn5/gICBgICAgYKBgICAgICAgYCAf39+fn5+f4B/fn59fn+AgICAf4B/gICAfnx8fX5+f39/f39/f4CAgICAf318e3x9fn5/gICAgICBgIGAgYCAgYKDg4KCgYCAgICAgIB/f39+fn19fX18e3p5ent8fHx8fHx8fH19fn5+fn5/gIB/f39/gICAgICAgICBgYCAgH9+fn19f4B/gH9/f35+fn59fX5/gICBgYCAgICAgYKDgoGBgIGBgYCAgICAgICAgH99fHt7e3x8fHx8fH18fXx8fH1+fXx9fX5+fn5+fn+AgICAgICAgICBgIGAgYCAgICAgICAf4B/f4CAf39/f39/fn9+f319fX5+fn9+fn5+fn5/gICAgICAgICAgICAgICAgIGAgYCAgICAgH9/gH9/f39/f39+f319fX19fX5+fn5+fn5/fn9+f4CAgH+AgH9/f35/gICAgICAgICAgICAgIGAgYCBgICAgICAgICAgICAgICAgICAf39/f39/fn9+fX19fX18fXx8fHt8fX1+fHx7fX1+f4CAgICAgICAgICAgICAgICAgICAgIB/f4CAgICAgICAgICAgH9+f4CAf39/f39+f4CAgICAgICAf39/f3+AgICAgIB/f3+AgIB/f35/gICAf39/f35/gH9/f39/f35/fn9+f3+AgICAgIB/f39/f39/gICAgH9/f39/f35/f39/f36Af39/f35/fn9+f35/fn9+fn5/gH9/gICAgICAgICAgIGAgH+AgICAgICAgICAf4CAgICAgH9/f39/f39/f39/fn9+f35/fn9+f35/fn9+f35/fn5+fn5+fn5+fn5+fn5+fn4="
const AUDIO_RELOAD = "data:audio/mpeg;base64,UklGRhcXAABXQVZFZm10IBAAAAABAAEAESsAABErAAABAAgAZGF0YfMWAAB9fX19fX19fX19fX19fX19fX19gIB9fX19fYCAfX2AfX19fX2AfX19fX2AgH2AgH19gICAgIB9fX2AgH19fX2AgH19fX19fX19gIB9fX19fX19gH19fYB9fX19fYB9aoqdXXp9cLNmY5B6fX2Ddo2AXYaNfXp2g3p2jYZ9doaDan2DgICKgG2AjX1zfYaAgHZzhoN6hnp2fYqGbXaQg3N6g4qAcICNgHqDg3qAenaDhnp9fXaGg3qAg316fX19eoCAfYCAgHp9g3p2gIOGfX2GdnN9gIN2c4CAhoN2c32Dg4Z9cH2Gg312gIZ6g4B6gHp2fYaDgIN6dnp9gIODfYB6cHqKgHB2g319hoCDbXqdemp6fYp9Onqtg4Z6YICTY2qmjWZ2ioqWdnONjYqKY3CqkF1ag6OdXWaqc3ONY32NcHB2fZaAdm1tkHBzk3NzkIZ2bXOGg3N9k5B2c312en1zg4Z9enZ9ioN9fXp9hoZwaoCQlnptfYCKgH2KfXNweo2NdnODg4OAfX12fYODfYaAc4Z6eoaAgIODfYCDg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gICAfX2Ag319gH19fXqAgICAenqAfX16fYB9gH2AfX2DenqDfYCAfYCAfXp9fX19fYCAfX19eoB9en19fYB9fYB9fYB9fX19fYCAgIB9fYB6fX16gIOAgIB9fYCAfXqAg4CAgH19fX16gIN9gIB9gH16fXp2eoCAgICAenqAen2AfX19gH19gH12fX19gICAfXqAgH19fXp9gICAfYB9fX19fXqAgICAgH19fX19fX2Ag4CAgH19fX19fYCAgICAgIB9en19fYCAgICAgH19fX19fYCDgIB9fX19enp9gICAgIB9fX16fX19fYCAgH19fXp9fX19gIB9fX2Aenp9fX19gIB9gIB9fX19en19gIOAfYB9fX19fYCAgIB9fX19fX19fX2AfX2AfX19en19fYB9gIB9fX19fXp9gH2AgICAfX19fX19gICAgICAfX19fX19fYCAgH19fX19fX19fYCAgIB9fX19fX19gICAgH19fX19fX2AgICAfX19fX19fX2AgICAfX19fX19gIB9gIB9fX19fXp9fX2AgH19fXp9fX19fYCAfYCAfXp9fX19gICAgIB9fX19fX19gICAgIB9fX19fYB9gICAgIB9fX19fYCAgICAgH19fX19fX19gICAgH19fX19fX2AgICAfX19fX19fX2AgH19fX19fX19gIB9gIB9fX19fX19fYCAgIB9fX19fX19gICAgIB9fX19fX2AgH2AgH19fX19fX2AgICAgH19fX19fX2AfYCAfX19fX19gICAgICAgH19fX19fYCAgICAfX19fX19gICAgIB9fX19fX19gICAgICAfX19fX2AgICAgH19fX19fYCAgICAgH19fX19fX2AgICAgH19fX19fYCAfYCAfX19fX19fX2AgH19fX19fX19fX19fX19fX19fX19fX19fYCAfX19fX19fYCAgIB9fX19fX19fYCAfX19fX19fX19gICAgH19fX19fYCAfYCAfX19fX19gICAgICAgH19fX2AgICAgICAfX19fX19gICAgIB9fX19fX2AgICAgIB9fX19fYCAgICAgH19fX19fYCAgICAgIB9fX19gICAgICAfX19fX19fYCAgICAfX19fX19gICAgIB9fX19fX19gICAgH19fX19fX19gICAgH19fX19fYCAgICAgH19fX19fYCAgICAfX19fX19fX19fX19fX19fX19fX2AgIB9fX19fX19fYCAgIB9fX19fX19gICAgH19fX19fX19gICAgH19fX19fX19gICAgIB9fX19fYCAgICAgICAfX19gICAgICAgIB9fX19gICAgICAgH19fX2AgICAgICAfX19fX2AgICAgICAfX19fX19gICAgIB9fX19fX2AgICAgICAgH19gICAgICAgICAgH19fYCAgICAgH19fX19fX2AgIB9fX19fX19fX19fX19fX19fX19fX19gH19fX19fX19fYCAgH19fX19fX19gICAgIB9fX2AgICAgICAgH19fX19fX2AfX19fX19fX19fX2AgIB9fX19fX2AgICAfX19gIB9fX2AgICAfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX2AgH19fX19fX2AgH2AgICAfX2AfX19fX19fYCAfX19fYCAfX19fX19fX19fYCAfX19fX19fX19fYB9fX19fX19fX19fX2AgH19fX19fX19gICAgICAfX19fX2AgICAgICAfX19fYCAgICAgICAfX19fX2AgH2AgH19gH19fX19gIB9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19gH19gH19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX2AgIB9fX19gH19gICAgICAgICAgH19fYCAgH19gICAgH2AgIB9fX19fX19fX2AfX19fX19fX19fX19fX19gIB9fYCAgH19fYCAfX19gH19gIB9gH19fX19fX19fX2AfX19gIB9fX19gH19fYODen12c4aKdoCAfYB6doCGenaAg4p2dn2Ahn2AgHp2eoaGenZ2g4aAfXaDhoB2c4CDgIB9en2Kg3Z9fX2DgHp6g4N6en19g4OQlpCDjYaDgFpzg2NaYHpwfZOWjWpTXaCtdnBtanqTmoNwan2KbWqDg4aNfYCdg3aNfXNqfYZ6lpB2fX19gIBtc5CGioB2io2GbWaQnXNqdoOWkHODhm2Kg216ho16gH1zeoODc4CDfYB6gIB2cH19doOAc3aAeoCAfX2DfXZ9enBzgIqDgH12fXqAg4B6gIB2gIqAdn2DfXaGdm2Qg3aWdmOQdn2Kio2AYIN9eop9fW2Wel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AfYB9en2AgH2DfXqDfXaAg4B9gH16gICAgIB6gIZ6fX16gIOAeoCAgIZ9doOAeoCDen2DenZ9fYN9eoOAfYB9enqAgH2Ag3qAhn19g316gIB9gIN9fYN9eoCAfYB9fYN9fYCAfX2AgH2AgHqAgH2AgH19gH2DgHqAgIB9fXp9fYB9en19gIB9fX2AfXp9fX19fYB9en19en19fYB9en19fYCAfXp6gH19gHp9gH19fX2AfXp9gH19fX19gH19gIB6fYB9fX19gIB9fX19fX2Aen2AfX2AfYCAgH19gH19g316g4B9gIB9gH19g3p9gH2AfYCAfX19gH19gH2AfX2AgIB9fYB9fYCAfXqAgH2AfX2AfYCAen2AeoCAeoCAfYCAfX2AfXp9gH19gICAfX19fX19gHqAfXqAgH19fX19gH19gH19gH19gH19gIB6fYB9eoCAfYB9fYB9fX2AfYCAfX19fX19fX19fX19fX19fX19"
const CURSOR = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🔫</text></svg>") 16 0,auto`
const history = []
let gunUp = false
let target = null
const clickarea = document.createElement("div")
clickarea.id = "-doom-clickarea"
clickarea.style.position = "fixed"
clickarea.style.display = "none"
clickarea.style.border = "2px dashed red"
// clickarea.style.backgroundColor = 'rgba(128,128,128,0.5)'
// clickarea.style.boxShadow = '0 0 1px 1px inset red'
clickarea.style.pointerEvents = "none"
clickarea.style.zIndex = 2147483647
clickarea.style.cursor = CURSOR
document.body.appendChild(clickarea)
const a = new Audio(AUDIO_RELOAD)
a.volume = 0.5;
const setTarget = function setTarget(t) {
if (target) {
// before setting, reset change to previous target if any
target.style.pointerEvents = ""
target.style.cursor = ""
}
target = t
if (!target) {
clickarea.style.display = "none"
return
}
const { top, left, width, height } = target.getBoundingClientRect()
clickarea.style.top = `${top}px`
clickarea.style.left = `${left}px`
clickarea.style.width = `${width}px`
clickarea.style.height = `${height}px`
clickarea.style.display = "block"
}
const isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0
const shoot = () => {
const a = new Audio(AUDIO_PISTOL)
a.volume = 0.5;
a.play();
clickarea.style.display = "none"
target.dataset.origStyle = target.getAttribute("style");
target.setAttribute("style", `display:none !important`)
history.push(target)
// why did we need this...
document.getSelection().removeAllRanges()
}
window.onkeydown = (e) => {
const cmdOrCtrl = isMac ? e.metaKey : e.ctrlKey
const combo = cmdOrCtrl && e.altKey
if (!gunUp && combo) {
a.play()
}
gunUp = combo
if (gunUp) {
document.documentElement.style.cursor = CURSOR
overridePointerEventsCSS()
setTarget([].slice.call(document.querySelectorAll(":hover")).pop())
}
if (e.code === "KeyZ" && cmdOrCtrl && history.length) {
const el = history.pop()
el.setAttribute("style", el.dataset.origStyle ?? "")
el.dataset.origStyle = null
// iframes need it to start recieve key events
el.focus()
}
}
function overridePointerEventsCSS() {
const style = document.getElementById("-doom-ptr-ev") || document.createElement("style")
style.id = "-doom-ptr-ev"
style.innerHTML = "*:not(#-doom-clickarea) {pointer-events: initial !important;}"
document.body.appendChild(style)
}
function restorePointerEventsCSS() {
const style = document.getElementById("-doom-ptr-ev")
if (style) {
style.innerHTML = ""
}
}
window.onkeyup = (e) => {
gunUp = false
restorePointerEventsCSS()
document.documentElement.style.cursor = ""
setTarget(null)
}
window.onmouseover = (e) => {
if (!gunUp) return
setTarget(e.target)
}
let forceScrollableSet = false
const handleMouseup = (e) => {
if (!gunUp) return
if (!forceScrollableSet) {
// sometimes break sites. buthuhm
const style = document.getElementById("-doom-scroll") || document.createElement("style")
style.id = "-doom-scroll"
// make everything scrollable to fix paywall ...
style.innerHTML = "* { overflow-y: initial !important; filter: none!important; }"
document.head.appendChild(style)
forceScrollableSet = true
// if they put important we have to do this too.
document.body.setAttribute("style", `${document.body.getAttribute("style") ?? ""}; overflow-y: initial !important`)
document.documentElement.setAttribute("style", `${document.documentElement.getAttribute("style") ?? ""}; overflow-y: initial !important; position: initial !important`)
}
if (e) {
// dont trigger a click on that thing.
e.preventDefault && e.preventDefault()
e.stopPropagation && e.stopPropagation()
e.stopImmediatePropagation && e.stopImmediatePropagation()
}
if (!target) {
setTarget(e.target)
}
if (target.nodeName === "HTML") {
window.parent.postMessage({ msg: "shoot_iframe", location: location.href }, "*")
} else {
shoot()
}
}
const preventClick = (e) => {
if (!gunUp) return
e.preventDefault && e.preventDefault()
e.stopPropagation && e.stopPropagation()
e.stopImmediatePropagation && e.stopImmediatePropagation()
}
window.addEventListener("mousedown", preventClick, true)
window.addEventListener("click", preventClick, true)
window.addEventListener("mouseup", handleMouseup, true)
window.addEventListener("blur", _ => {
// we've lost focus of the window put down the gun. keyup events wont be
// captured.
window.onkeyup({})
})
// handle an iframe. the event is captured inside the iframe, who cannot have
// itself removed from the parent... window.close() does not work..
window.addEventListener(
"message",
(e) => {
if (e.data && e.data.msg === "shoot_iframe" && e.data.location) {
gunUp = true
// unfortunately we can't ctrl z it...
setTarget(document.querySelector(`iframe[src="${e.data.location}"]`))
shoot();
}
},
false
)
})()