Last active
March 2, 2021 14:35
-
-
Save robertrypula/83c1f36070c1991370adf1c8882f5e98 to your computer and use it in GitHub Desktop.
Adds 'kurwa' to any website that you want. Simply execute the script in the Console tab in DevTools (F12)
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
document.querySelectorAll('*').forEach(function(element) { | |
var content = element.innerHTML.trim().replace(/ +(?= )/g, ''); | |
var wordList = content.split(' '); | |
var numberOfKurwa = Math.max(1, Math.round(wordList.length * 0.2)); | |
var randomPosition; | |
var i; | |
if (content.indexOf('<') === -1 && wordList.length > 1) { | |
while (numberOfKurwa--) { | |
randomPosition = Math.max( | |
1, | |
Math.floor(Math.random() * wordList.length) | |
); | |
wordList.splice(randomPosition, 0, 'kurwa'); | |
} | |
element.innerHTML = wordList.join(' '); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment