Remove StartPage's sponsored results

Remove top and bottom sponsored results from StartPage searches

// ==UserScript==
// @name         Remove StartPage's sponsored results
// @namespace    http://tampermonkey.net/
// @version      2025-09-03
// @description  Remove top and bottom sponsored results from StartPage searches
// @author       pdcmoreira
// @match        https://www.startpage.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=startpage.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function waitForElement(id) {
        return new Promise(resolve => {
            const element = document.getElementById(id)

            if (element) {
                return resolve(element);
            }

            const observer = new MutationObserver(mutations => {
                const element = document.getElementById(id)

                if (element) {
                    observer.disconnect();

                    resolve(element);
                }
            });

            observer.observe(document.body, {
                childList: true,
                subtree: true
            });
        });
    }

    ['gcsa-top', 'gcsa-bottom'].forEach((id) => {
        waitForElement(id).then((el) => {
            el.remove();
        });
    })
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址