Last active
November 4, 2015 13:52
-
-
Save moklick/5b6c90915f166af33d14 to your computer and use it in GitHub Desktop.
Changes Twitter Hearts To Stars Again
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
/* | |
* Get the good old favorite ★ back. | |
* | |
* Copy the few lines below into the console of your browser and press enter. | |
* Chrome: https://developer.chrome.com/devtools#access | |
* Firefox: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console | |
*/ | |
// updated version (this also works for new pulled tweets): | |
var style = document.createElement('style'); | |
document.head.appendChild(style); | |
style.sheet.insertRule('.HeartAnimation {background:none; top:0; }', 0); | |
style.sheet.insertRule('.HeartAnimation:after {content:"★"}', 1); | |
// old version: | |
[].forEach.call(document.querySelectorAll('.HeartAnimation'), function(i){ | |
i.style.background = 'none'; | |
i.style.top = 0; | |
i.innerHTML = '★'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment