-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdigitalwellbeing.js
58 lines (50 loc) · 2.27 KB
/
digitalwellbeing.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
// ==UserScript==
// @name digital_wellbeing
// @run-at document-start
// @match *://*/*
// ==/UserScript==
window.setInterval(()=>{
if ( document.querySelector('video') ) {
document.querySelectorAll('video').forEach(video=>{
video.pause();
video.remove();
});
}
}, 1);
/*-------------------------------------------------------------------------*/
window.setInterval( () => {
const urlPatternToBlock = [
'cnn',
'search-console'
];
for (let element of urlPatternToBlock) {
if ( window.location.href.includes(urlPatternToBlock) ) {
window.open("https://google.com/", "_self");
}
}
}, 2);
if ( window.location.href.includes('nws') ) {window.open("https://google.com/", "_self");}
// Timely !!! //
if ( window.location.href.includes('search-console') ) { window.open("https://google.com/", "_self"); }
/*-------------------------------------------------------------------------*/
if (
document.querySelector('title')?.textContent.includes('News') ||
document.querySelector('title')?.textContent.includes('news') ||
document.querySelector('meta[name="title"]')?.content.includes('News') ||
document.querySelector('meta[name="title"]')?.content.includes('news') ||
document.querySelector('meta[name="description"]')?.content.includes('News') ||
document.querySelector('meta[name="description"]')?.content.includes('news') ||
document.querySelector('meta[name="tags"]')?.content.includes('News') ||
document.querySelector('meta[name="tags"]')?.content.includes('news') ||
/**/
document.querySelector('title')?.textContent.includes('חדשות') ||
document.querySelector('title')?.textContent.includes('החדשות') ||
document.querySelector('meta[name="title"]')?.content.includes('חדשות') ||
document.querySelector('meta[name="title"]')?.content.includes('החדשות') ||
document.querySelector('meta[name="description"]')?.content.includes('חדשות') ||
document.querySelector('meta[name="description"]')?.content.includes('החדשות') ||
document.querySelector('meta[name="tags"]')?.content.includes('חדשות') ||
document.querySelector('meta[name="tags"]')?.content.includes('החדשות')
) {
window.open("https://google.com/", "_self");
}