Last active
March 27, 2023 06:22
-
-
Save DeflateAwning/84ad43a237c9927d1f39d47e928d5482 to your computer and use it in GitHub Desktop.
Tamper Monkey script to hide ads and add links to Startpage searches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Startpage Upgrades | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Hide Ads on Startpage search results page, add links to other search engines, set title tag better | |
// @author You | |
// @include https://startpage.com/* | |
// @include https://*.startpage.com/* | |
// @run-at document-idle | |
// @version 2023-03-27 | |
// @grant GM_addStyle | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js | |
// ==/UserScript== | |
// Hide Ads | |
// Source (sort of): https://superuser.com/a/979579 | |
GM_addStyle("div#adBlock { display: none !important}"); | |
// Add Links to Other Engines | |
let search_term = $("#q").val(); | |
$(".w-gl__label").append(' | <a href="https://google.com/search?q=' + encodeURIComponent(search_term) + '">Search on Google</a>'); | |
$(".w-gl__label").append(' | <a href="https://www.wolframalpha.com/input/?i=' + encodeURIComponent(search_term) + '">Lookup on the best tool ever made (Wolfram Alpha)</a>'); | |
// Set title tag based on search | |
let new_title = search_term + ' | Startpage Results'; | |
document.title = new_title; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment