Skip to content

Instantly share code, notes, and snippets.

@zettca
Last active May 22, 2018 00:58
Show Gist options
  • Save zettca/631f462ba9c0c503904b to your computer and use it in GitHub Desktop.
Save zettca/631f462ba9c0c503904b to your computer and use it in GitHub Desktop.
!function(e,t){const i=e=>document.getElementsByClassName(e);i("_si7dy");function r(){const e=i("like"===t?"coreSpriteHeartOpen":"coreSpriteHeartFull")[0];e&&e.click(),i("coreSpriteRightPaginationArrow")[0].click()}new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.length&&(setTimeout(r,100),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.length&&setTimeout(r,100)})}).observe(e.addedNodes[0].firstChild.children[1].firstChild.firstChild,{attributes:!0,childList:!0,characterData:!0}))})}).observe(document.body,{childList:!0})}(0,"like");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment