Anti Filter Bubble

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==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);

})();