-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.js
45 lines (40 loc) · 1.41 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
window.addEventListener('load', function() {
const ids = [
'hs-eu-cookie-confirmation', //hubspot gdpr popup
'hubspot-messages-iframe-container', //hubspot chatbot
'sccm-container', //sanoma websites popup
'intercom-container', //intercom popup
'gdpr-banner', //gdpr banner at least on intercom.com
'js-gdpr-consent-banner', //gdpr banner on stackoverflow
'banner__container', //nytimes gdpr crap
'cx_bottom_banner', //nbcnews
'privacy-consent', //theverge
'chatbot-chat', //chatbot.com
'CybotCookiebotDialog', //Cookie dialogue
];
const classes = [
'alma-data-policy-banner', //alma privacy
'as-oil-greeter', // alma popup
'tp-backdrop', //independent.co.uk
'tp-modal', //independent.co.uk
]
//Timeout that waits for async crap to load
setTimeout(function(){
//Remove ids
ids.forEach(function(id) {
var element = document.getElementById(id);
if (element != null) {
console.log('Removing ' + id);
element.remove();
}
});
//Remove classes
classes.forEach(function(cla) {
var element = document.getElementsByClassName(cla)[0];
if (element != null) {
console.log('Removing ' + cla);
element.remove();
}
});
},1000);
});