Created
November 10, 2017 12:11
-
-
Save matey-jack/78c55b85604dfc7447d05c1ea5426f62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "release version" of script is at https://openuserjs.org/scripts/matey-jack/rot17 | |
// ==UserScript== | |
// @name tatta | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description mangle text so user can appreciate the layout better! | |
// @author You | |
// @match *://*/* | |
// @exclude https://*.google.com/* | |
// @exclude https://*.google.de/* | |
// @exclude https://web.whatsapp.com | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js | |
// @grant none | |
// ==/UserScript== | |
/* | |
so kann man Funke-Seite am Header erkennen: | |
<script type="text/javascript" async="" src="https://cdn-t.omsnative.de/nativendo.js?c=localnews&w=oms.morgenpost.de"></script> | |
<script src="//players.brightcove.net/* /* /index.min.js"></script> | |
<link type="text/css" rel="stylesheet" href="https://c.omsnative.de/assets/css/nativendo.css?22170078"> | |
<script src="//www.video.oms.eu/ada/cloud/omsv_container_151.js" charset="UTF-8"></script> | |
falls mit UND verknüpft, müssen alle Links permissiv genug gematched werden. | |
Falls mit ODER verknüpft, treffen wir natürlich eher zu viele Seiten, aber das ist dann vielleicht gar nicht so verkehrt ;*) | |
*/ | |
(function() { | |
'use strict'; | |
console.log("rot17: I AM HERE"); | |
let text_nodes = []; | |
function recursiveWalk(node) { | |
if (node) { | |
node = node.firstChild; | |
while (node !== null) { | |
if (node.nodeType == 3) { | |
text_nodes.push(node); | |
} else if (node.nodeType == 1) { | |
recursiveWalk(node); | |
} | |
node = node.nextSibling; | |
} | |
} | |
} | |
recursiveWalk(document.body); | |
text_nodes.forEach((node) => { | |
node.textContent = node.textContent.replace(/[aeiouöäü]/gi, 'a').replace(/[b-z]/gi, 't'); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment