【広告除去】AdGuard Part101

2026/06/27(土) 08:27:36.80ID:jl5TFjuu
// ==UserScript==
// @name Google画像検索 ドメイン除外
// @match https://www.google.*/*tbm=isch*
// @run-at document-end
// ==/UserScript==

(function () {
'use strict';

const block = [
'pinterest.',
'instagram.com',
'tiktok.com'
];

function hide() {
document.querySelectorAll('a[href]').forEach(a => {
const href = a.href.toLowerCase();
if (block.some(d => href.includes(d))) {
const item = a.closest('[data-ved]') || a.closest('div');
if (item) item.style.display = 'none';
}
});
}

hide();
new MutationObserver(hide).observe(document.body, {
childList: true,
subtree: true
});
})();
2026/06/27(土) 08:37:54.17ID:lbQKqs+K
消えないね
https://i.imgur.com/5CT73y3.jpeg
2026/06/27(土) 08:51:57.84ID:XZWjknvB
動的に個別の要素に対してスタイルをあてるのはナンセンス
静的なCSSを注入するだけでいい
2026/06/27(土) 09:27:57.53ID:RQvOo/2Y
ublacklistで非表示にする
2026/06/27(土) 09:30:24.60ID:iBQfvx8c
>>8
これたまにバグルが強力だね。バグを解消してくれ
2026/06/27(土) 09:46:06.49ID:lbQKqs+K
>>72
それって検索時のurlに -pinterest とか入るやつだろう?
75名無しさん@お腹いっぱい。
垢版 |
2026/06/27(土) 10:16:32.95ID:3tCSHYZl
ublack listは使えるブラウザが限定してるので好みが分かれそうだけど
https://i.imgur.com/MXizoBn.jpeg
https://i.imgur.com/yrrRH0o.jpeg
クックパッドや食べログ他、多数山ほど登録して便利だけど自分の場合あくまでサブブラウザで使用。やっぱりChromeが何かと便利で消極的理由でメイン
レスを投稿する