Skip to content

Instantly share code, notes, and snippets.

@juzam
Last active December 1, 2017 09:58
Show Gist options
  • Save juzam/c71b5e897cb1865dbc6a3364926ce178 to your computer and use it in GitHub Desktop.
Save juzam/c71b5e897cb1865dbc6a3364926ce178 to your computer and use it in GitHub Desktop.
GreaseMonkey/Tampermonkey script to substitute every occurrence of "fake news" with a more accurate description.
// ==UserScript==
// @name Grande Minchiata
// @namespace http://juzam.net/
// @version 0.1
// @description fake news = minchiate
// @author [email protected]
// @match http://*/*
// @include *
// @grant none
// ==/UserScript==
(function() {
'use strict';
var els = document.getElementsByTagName("*");
for(var i = 0, l = els.length; i < l; i++) {
var el = els[i];
el.innerHTML = el.innerHTML.replace(/le fake news/gi, 'le minchiate');
el.innerHTML = el.innerHTML.replace(/la fake news/gi, 'la minchiata');
el.innerHTML = el.innerHTML.replace(/fake news fa/gi, 'minchiata');
el.innerHTML = el.innerHTML.replace(/fake news/gi, 'minchiate');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment