Last active
August 29, 2015 14:01
-
-
Save akx/eaf12f0f79dea1b27819 to your computer and use it in GitHub Desktop.
velhosuomi.js (bookmarklet)
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
javascript:(function(){[].slice.call(document.querySelectorAll("*")).filter(function(e){return-1==e.innerHTML.indexOf("<")}).forEach(function(e){var n=Math.random()<.7?"aeiou":"äeiöy";e.innerHTML=e.innerHTML.replace(/[aeiouyåäö]+/gi,function(e){var r=n[0|5*Math.random()];return e[0].toUpperCase()==e[0]&&(r=r.toUpperCase()),r})})}()); |
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
(function () { | |
[].slice.call(document.querySelectorAll("*")).filter(function (node) { | |
return node.innerHTML.indexOf("<") == -1; | |
}).forEach(function (node) { | |
var LETTERS = Math.random() < 0.7 ? ("aeiou") : ("äeiöy"); | |
node.innerHTML = node.innerHTML.replace(/[aeiouyåäö]+/ig, function (m) { | |
var l = LETTERS[0 | (Math.random() * 5)]; | |
if (m[0].toUpperCase() == m[0]) l = l.toUpperCase(); | |
return l; | |
}) | |
}); | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment