-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkill-sticky.js
30 lines (25 loc) · 964 Bytes
/
kill-sticky.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
(function () {
var i, elements = document.querySelectorAll('body *');
// all elements with position 'fixed' or 'sticky'
for (i = 0; i < elements.length; i++) {
var style = getComputedStyle(elements[i]);
if (style.position === 'fixed' || style.position === 'sticky')
elements[i].parentNode.removeChild(elements[i]);
}
var selectors = [
'aside.right-part', // Index.hr right column 1
'div.right-part', // Index.hr right column 2
'div.dfp-inarticle', // Index.hr in-article ad
'div.ad-container', // Index.hr below article ad
'div.secondary-content',// Bug.hr right column
'div.banner-slot', // Telegram in-article banners
'div#intext_premium', // Telegram in-article banners
'aside#slashboxes', // Slashdot.org right column
'span.ezoic-ad' // PlantUML.com
];
for (s = 0; s < selectors.length; s++) {
elements = document.querySelectorAll(selectors[s]);
for (i = 0; i < elements.length; i++)
elements[i].remove();
}
})();