Skip to content

Instantly share code, notes, and snippets.

@moklick moklick/twitter-stars.js
Last active Nov 4, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.