Critiques pour Tampermonkey
Tampermonkey par Jan Biniok
Avis de DannSKiller
Noté 5 sur 5
par DannSKiller, il y a 2 ansAfter getting annoyed with searches I didn't want showing up on my Google page, especially for video searches, my web browser redirected me to TikTok. That platform is totally useless and shouldn't even be linked with Google. I'm sharing the script below that will help you block sites as well."
// ==UserScript==
// @name Google Search Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Filter out specified sites from Google search results
// @author Your Name
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const blockedSites = ['example.com', 'anotherexample.com']; // Add the sites you want to block here
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
blockedSites.forEach(site => {
const results = document.querySelectorAll(`a[href*="${site}"]`);
results.forEach(result => {
const parent = result.closest('.g'); // Google results container
if (parent) {
parent.style.display = 'none';
}
});
});
}
});
});
observer.observe(document.body, { childList: true, subtree: true });
// Initial execution for already loaded content
blockedSites.forEach(site => {
const results = document.querySelectorAll(`a[href*="${site}"]`);
results.forEach(result => {
const parent = result.closest('.g'); // Google results container
if (parent) {
parent.style.display = 'none';
}
});
});
})();
// ==UserScript==
// @name Google Search Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Filter out specified sites from Google search results
// @author Your Name
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const blockedSites = ['example.com', 'anotherexample.com']; // Add the sites you want to block here
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
blockedSites.forEach(site => {
const results = document.querySelectorAll(`a[href*="${site}"]`);
results.forEach(result => {
const parent = result.closest('.g'); // Google results container
if (parent) {
parent.style.display = 'none';
}
});
});
}
});
});
observer.observe(document.body, { childList: true, subtree: true });
// Initial execution for already loaded content
blockedSites.forEach(site => {
const results = document.querySelectorAll(`a[href*="${site}"]`);
results.forEach(result => {
const parent = result.closest('.g'); // Google results container
if (parent) {
parent.style.display = 'none';
}
});
});
})();
5 237 notes
- Noté 5 sur 5par Utilisateur ou utilisatrice 19709889 de Firefox, il y a 2 joursReally efficient. This is my new obsession.
- Noté 5 sur 5par Breno, il y a 4 jours
- Noté 1 sur 5par keenoy, il y a 11 jours
- Noté 5 sur 5par Eti, il y a 15 jours
- Noté 5 sur 5par left2crazy, il y a 20 jours
- Noté 5 sur 5par Vormix_Sv, il y a 20 jours
- Noté 5 sur 5par melodic mustox, il y a 20 joursThanks to Tampermonkey, I can do a lot of things from my browser. I thanks with a donation, which I will repeat next month again for sure.
- Noté 4 sur 5par Carlos Páez, il y a un mois
- Noté 5 sur 5par Utilisateur ou utilisatrice 13035229 de Firefox, il y a un mois
- Noté 5 sur 5par Utilisateur ou utilisatrice 18699594 de Firefox, il y a un mois
- Noté 5 sur 5par Antonio Johns, il y a un mois
- Noté 5 sur 5par Yuri, il y a un mois
- Noté 5 sur 5par Saphir, il y a un mois
- Noté 5 sur 5par Marlon Ruiz, il y a un mois
- Noté 5 sur 5par SergioDT, il y a 2 moisEssential. I can't imagine the internet without this extension.
- Noté 5 sur 5par biki, il y a 2 mois
- Noté 5 sur 5par Fabax, il y a 2 moisUserscript manager of choice since greasemonkey (sadly) doesn't cut it anymore with newer scripts.
- Noté 5 sur 5par Utilisateur ou utilisatrice 19602270 de Firefox, il y a 2 mois
- Noté 5 sur 5par Utilisateur ou utilisatrice 17775866 de Firefox, il y a 2 mois
- Noté 5 sur 5par Utilisateur ou utilisatrice 14835773 de Firefox, il y a 2 mois
- Noté 5 sur 5par ace, il y a 2 mois