Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DuckDuckGo Everywhere Tampermonkey Script
// ==UserScript==
// @name no google pls
// @version 0.1
// @description ddg pls dad
// @author Arsen
// @include *://www.google.*/*
// @grant none
// ==/UserScript==
(function(){'use strict';let p=(q=>{if(!q){return{};}return(/^[?#].+/.test(q)?q.slice(1):q).split('&').reduce((ps,p)=>{let[k,v]=p.split('=');ps[k]=v?(v.replace(/\+/g,' ')):'';return ps;},{});});let s=p(location.search).q;if(!s){s=p(location.hash).q;}if(!s){return;}location.href='https://duckduckgo.com/?q='+s;})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment