-
Notifications
You must be signed in to change notification settings - Fork 1
/
nodoxplease.js
43 lines (36 loc) · 1.25 KB
/
nodoxplease.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
// ==UserScript==
// @name NoDoxPlease
// @namespace http://hypixel.lol
// @version 2024-05-28
// @description Removes Google's "Results for" section from search results and your location from the footer of the page.
// @author Euro-pol
// @match https://www.google.com/search*
// @icon https://www.github.com/Euro-pol/nodoxplease/raw/main/icon.png
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
const elements = ["#taw", "#footcnt", "#oFNiHe"]
function waitForElm(selector) {
return new Promise(resolve => {
if (document.querySelector(selector)) {
return resolve(document.querySelector(selector));
}
const observer = new MutationObserver(mutations => {
if (document.querySelector(selector)) {
observer.disconnect();
resolve(document.querySelector(selector));
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
});
}
for (const element of elements) {
waitForElm(element).then(elm => {
elm.remove();
});
}
})();