Skip to content

Instantly share code, notes, and snippets.

@Dan8267
Last active November 1, 2020 19:02
Show Gist options
  • Save Dan8267/4084af94d588e77f7ea2f28d2ce8985e to your computer and use it in GitHub Desktop.
Save Dan8267/4084af94d588e77f7ea2f28d2ce8985e 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