Skip to content

Instantly share code, notes, and snippets.

@bmcminn
Last active December 27, 2019 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmcminn/759100989688df90b6b9d2b4523118f5 to your computer and use it in GitHub Desktop.
Save bmcminn/759100989688df90b6b9d2b4523118f5 to your computer and use it in GitHub Desktop.
Website uwuizer script, enter in your browser console or make a browser extension with it :P Define custom selectors to uwuize in the `URIs` object by matching the key as the page URL hostname
var SELECTOR = 'span, p, b, a'
document.querySelectorAll(SELECTOR)
.forEach(el => {
el.innerText = el.innerText.replace(/l|r/gm, 'w');
return el
})
var SELECTOR = null
var HOSTNAME = window.location.hostname
var URIs = {
'facebook.com': '[aria-label="Comment"] [data-hovercard] + span span span',
}
Object.keys(URIs)
.some((label) => {
let REGEX = new RegExp(label)
if (URIs.hasOwnProperty(label) && HOSTNAME.match(REGEX)) {
SELECTOR = URIs[label]
return true
}
})
document.querySelectorAll(SELECTOR)
.forEach(el => {
el.innerText = el.innerText.replace(/l|r/gm, 'w');
return el
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment