Skip to content

Instantly share code, notes, and snippets.

@robertrypula
Last active March 21, 2025 10:20
Show Gist options
  • Save robertrypula/83c1f36070c1991370adf1c8882f5e98 to your computer and use it in GitHub Desktop.
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)
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(' ');
}
});
@m0veax
Copy link

m0veax commented Oct 23, 2024

I made a firefox extension out of this :D

https://github.com/m0veax/kurwa-firefox

@robertrypula
Copy link
Author

I made a firefox extension out of this :D

https://github.com/m0veax/kurwa-firefox

I love it <3 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment