Anti Filter Bubble

Google anti-filter engine:hide big tech globally, forums & pre-2015 filters search

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Anti Filter Bubble 
// @namespace    https://openweb-tools.example
// @version      1.0
// @description  Google anti-filter engine:hide big tech globally, forums & pre-2015 filters search 
// @match        https://www.google.*/*
// @grant        none
// @license      GPL-3.0-or-later
// @run-at       document-idle
// ==/UserScript==

/*
GPL v3
https://www.gnu.org/licenses/gpl-3.0.html
*/

(function () {
'use strict';

if (!location.href.includes("/search")) return;
if (document.getElementById("afb-v5")) return;

/* ---------- STORAGE ---------- */

const STORAGE = {
    hide: "afb_hide_bigtech",
    forums: "afb_forums",
    old: "afb_old"
};

/* ---------- STATE ---------- */

let hide = localStorage.getItem(STORAGE.hide) === "1";
let forums = localStorage.getItem(STORAGE.forums) === "1";
let old = localStorage.getItem(STORAGE.old) === "1";

/* ---------- CONFIG ---------- */

const BLOCK = [
"reddit.com","quora.com","youtube.com",
"facebook.com","instagram.com","tiktok.com",
"twitter.com","x.com","pinterest.com","medium.com"
];

/* ---------- HELPERS ---------- */

function preservePage(u){
    const current = new URL(location.href);
    const start = current.searchParams.get("start");
    if (start) u.searchParams.set("start", start);
}

/* ---------- UI (OFFSET LEFT) ---------- */

const panel = document.createElement("div");
panel.id = "afb-v5";

panel.style = `
position:fixed;
bottom:20px;
right:200px; /* <-- KEY FIX: shifted left from Deep Search Jumper */
z-index:999999;
background:rgba(0,0,0,0.9);
color:#0f0;
padding:10px;
border-radius:10px;
font-family:monospace;
font-size:12px;
box-shadow:0 0 10px rgba(0,0,0,.6);
`;

panel.innerHTML = `
<b>AntiFilter</b><br>

<button id="afb-hide">Hide BigTech</button>
<button id="afb-forum">Forums</button>
<button id="afb-old">Pre2015</button>
`;

document.body.appendChild(panel);

/* ---------- FILTER ---------- */

function applyFilter(){
    if (!hide) return;

    document.querySelectorAll("div.g, div.MjjYud").forEach(el=>{
        const a = el.querySelector("a");
        if (!a) return;

        if (BLOCK.some(d => a.href.includes(d))){
            el.style.display = "none";
        }
    });
}

/* ---------- BUTTONS ---------- */

document.getElementById("afb-hide").onclick = () => {
    hide = !hide;
    localStorage.setItem(STORAGE.hide, hide ? "1" : "0");
    applyFilter();
};

document.getElementById("afb-forum").onclick = () => {
    forums = !forums;
    localStorage.setItem(STORAGE.forums, forums ? "1" : "0");

    const u = new URL(location.href);
    let q = u.searchParams.get("q") || "";

    if (forums && !q.match(/\bforum\b/i)) q += " forum";
    if (!forums) q = q.replace(/\bforum\b/gi,"").trim();

    u.searchParams.set("q", q);
    preservePage(u);

    location.href = u.toString();
};

document.getElementById("afb-old").onclick = () => {
    old = !old;
    localStorage.setItem(STORAGE.old, old ? "1" : "0");

    const u = new URL(location.href);

    if (old){
        u.searchParams.set("tbs","cdr:1,cd_min:1/1/1990,cd_max:12/31/2014");
    } else {
        u.searchParams.delete("tbs");
    }

    preservePage(u);
    location.href = u.toString();
};

/* ---------- AUTO APPLY ---------- */

setInterval(applyFilter, 1200);

})();