Skip to content

Instantly share code, notes, and snippets.

@moklick
Last active November 4, 2015 13:52
Show Gist options
  • Save moklick/5b6c90915f166af33d14 to your computer and use it in GitHub Desktop.
Save moklick/5b6c90915f166af33d14 to your computer and use it in GitHub Desktop.
Changes Twitter Hearts To Stars Again
/*
* 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