Skip to content

Instantly share code, notes, and snippets.

@pdcmoreira
Last active September 3, 2025 13:13
Show Gist options
  • Save pdcmoreira/03cf282bde25eaa72bacc1ba9001082e to your computer and use it in GitHub Desktop.
Save pdcmoreira/03cf282bde25eaa72bacc1ba9001082e to your computer and use it in GitHub Desktop.
// ==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();
});
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment