-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinjection.js
More file actions
64 lines (52 loc) · 1.75 KB
/
injection.js
File metadata and controls
64 lines (52 loc) · 1.75 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
59
60
61
62
63
try {
const removeComments = () => {
const comments = document.getElementById("wpd-threads")
if (comments) comments.remove()
}
const removeAds = () => {
// Aside
const asides = document.getElementsByTagName("aside")
Array.from(asides).forEach((aside) => {
if (aside) aside.remove()
})
// Code Blocks(Ads ffmpeg)
const codeBlocks = document.getElementsByClassName("code-block")
Array.from(codeBlocks).forEach((codeBlock) => {
if (codeBlock) codeBlock.remove()
})
// Ezoic AD ID
const ezoicAdsID = document.querySelectorAll("[id*='ezoic']")
Array.from(ezoicAdsID).forEach((ezoicAd) => {
if (ezoicAd) ezoicAd.remove()
})
// Ezoic Ad Class
const ezoicAdsClass = document.querySelectorAll("[class*='ezoic']")
Array.from(ezoicAdsClass).forEach((ezoicAd) => {
if (ezoicAd) ezoicAd.remove()
})
}
const removeUniversalInsert = () => {
const universalInserts = document.getElementsByClassName("humix-universal-js-insert")
Array.from(universalInserts).forEach((universalInsert) => {
if (universalInsert) universalInsert.remove()
})
}
const stretch = () => {
const main = document.getElementsByClassName("main")[0]
main.style.maxWidth = "100vw"
main.style.width = "95vw"
}
// Comments
removeComments()
setInterval(() => {
// Ads
removeAds()
// Additional videos (universal insert)
removeUniversalInsert()
}, 1000)
// Stretch out the Main
stretch()
} catch (error) {
// alert("Error") // Just for development part
console.log("Error in ext")
}