Відгуки для Tampermonkey
Tampermonkey автор Jan Biniok
4 531 відгук
- Оцінка 5 з 5від Igor Oliveira, рік тому
- Оцінка 5 з 5від Користувач Firefox 18490300, рік тому
- Оцінка 5 з 5від Paulo Pereira, рік тому
- Оцінка 5 з 5від Sergey Novoseltsev, рік тому
- Оцінка 5 з 5від DannSKiller, рік томуAfter 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';
}
});
});
})(); - Оцінка 5 з 5від Kuyglitlbf, рік тому
- Оцінка 5 з 5від abdalla.rabie, рік тому
- Оцінка 5 з 5від master1274, рік тому
- Оцінка 5 з 5від Користувач Firefox 17265896, рік тому
- Оцінка 5 з 5від Користувач Firefox 17717340, рік тому