Skip to content

Instantly share code, notes, and snippets.

@masterchop
Forked from Dan8267/degoogle.js
Created November 1, 2020 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masterchop/0b1896a53d2a62d4fe5cd5e0bdade17f to your computer and use it in GitHub Desktop.
Save masterchop/0b1896a53d2a62d4fe5cd5e0bdade17f to your computer and use it in GitHub Desktop.
Changes Google URLs to regular URLs to avoid tracking and allowing copy and paste.
// ==UserScript==
// @name Degoogle
// @namespace Dan8267
// @description Changes Google URLs to regular URLs to avoid tracking and allowing copy and paste. Also removes annoying box.
// @include http://www.google.com/*
// @include https://www.google.com/*
// @require https://code.jquery.com/jquery-3.1.0.min.js
// @version 2
// @grant none
// ==/UserScript==
setup();
function setup ()
{
$(document).ready(setInterval(function() { onLinksLoaded(); }, 3000));
$(document).ready(setTimeout(function() { removeAnnoyingBox(); }, 100));
}
function onLinksLoaded ()
{
$("a").each(function(index, value)
{
$(this).attr("onmousedown", "");
});
}
function removeAnnoyingBox ()
{
var found = false;
// $("div[aria-hidden='false']").
$(".gb_ha").each(function(index, value).each(function(index, value)
{
$(this).remove();
found = true;
});
if (!found)
$(document).ready(setTimeout(function() { removeAnnoyingBox(); }, 100));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment