Skip to content

Instantly share code, notes, and snippets.

@roman01la
Created November 3, 2015 19:19
Show Gist options
  • Save roman01la/8adc1756f64c867efb63 to your computer and use it in GitHub Desktop.
Save roman01la/8adc1756f64c867efb63 to your computer and use it in GitHub Desktop.
like2fav
function like2fav() {
function style(selector) {
return selector + '{ color: #ffac33 !important; }';
}
var s = document.createElement('style');
s.innerText = style('.ProfileTweet-action--favorite.withHeartIcon .ProfileTweet-actionButton:hover');
s.innerText += style('.favorited .ProfileTweet-action--favorite.withHeartIcon .ProfileTweet-actionButtonUndo');
s.innerText += style('.ProfileTweet-action--favorite.withHeartIcon .ProfileTweet-actionCount:hover');
document.head.appendChild(s);
Array.from(document.querySelectorAll('.HeartAnimation'))
.forEach((node) => (node.className = 'Icon Icon--favorite'));
}
@havenchyk
Copy link

Thanks for Array.from!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment