How to make Google Search look dumb? [closed]

Solution 1:

This is a job for TamperMonkey in Chrome (or Greasemonkey in Firefox). Something like this should do it:

// ==UserScript==
// @name       Tamper with Google Results
// @namespace  http://superuser.com/users/145045/krowe
// @version    0.1
// @description  This just modifies google results to exclude certain things.
// @match      http://*.google.com
// @match      https://*.google.com
// @copyright  2014+, KRowe
// ==/UserScript==


function GM_main () {
    window.onload = function () {
      var targ = window.location;
      if(targ && targ.href && targ.href.match('https?:\/\/www.google.com/.+#q=.+') && targ.href.search("/+-torrent/+-watch/+-download")==-1) {
        targ.href = targ.href +"+-torrent+-watch+-download";
      }
    };
}

//-- This is a standard-ish utility function:
function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
    var D=document, scriptNode = D.createElement('script');
    if(runOnLoad) scriptNode.addEventListener("load", runOnLoad, false);
    scriptNode.type = "text/javascript";
    if(text) scriptNode.textContent = text;
    if(s_URL) scriptNode.src = s_URL;
    if(funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
    var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
    targ.appendChild(scriptNode);
}

addJS_Node (null, null, GM_main);

This has only been tested in Chrome. Also, this doesn't work everywhere. For example, if you search from the start page instead of the location bar it will not work because the page load event doesn't fire. I'm not sure if this can be fixed or not.

I've done nothing to actually hide what is happening. I'd imagine that getting the URL to show the original results would be easy to do if you replace the page content with a frame and instead of the redirect you just load the new page into the frame. Getting the search box to work right is going to be a little more tricky but in the end is also very doable. The trick is going to be to use CSS to hide it then make another textbox to be seen. Then you'l just need to add a few event handlers to sync the real search box with your fake search box. User scripts can also be used without an extensions in Chrome but I have no experience with doing that because those scripts are not supposed to be cross browser compatible and these are. If you really want this hidden that is probably going to be something you want to do as well. Otherwise, the extension is always going to be visible to anyone who looks for it. You can hide the button for the extension though by right clicking on it.