Created
November 3, 2015 19:19
-
-
Save roman01la/8adc1756f64c867efb63 to your computer and use it in GitHub Desktop.
like2fav
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
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')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for
Array.from
!