-
-
Save cabrinha/86257dc33bfa40a30ece 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
<script> | |
var text = document; | |
var observer = new MutationObserver(function(mutations) { | |
mutations.every(function(mutation) { | |
var entry = { | |
mutation: mutation, | |
el: mutation.target, | |
value: mutation.target.textContent, | |
oldValue: mutation.oldValue | |
}; | |
if ($(mutation.target).is("iframe")) { | |
if ($(mutation.target).contents().find(".timeline-header > h1 > a").length) { | |
observer.disconnect(); | |
$(mutation.target).contents().find(".timeline-header > h1 > a").html("Joy"); | |
return false; | |
} | |
} | |
}); | |
}); | |
observer.observe(text, { | |
attributes: true, | |
childList: true, | |
characterData: true, | |
characterDataOldValue: true, | |
subtree: true | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment