Skip to content

Instantly share code, notes, and snippets.

@flesler
Created May 7, 2018 13:55
Show Gist options
  • Save flesler/38c248c045bddac65a4f7ac4720b3bb5 to your computer and use it in GitHub Desktop.
Save flesler/38c248c045bddac65a4f7ac4720b3bb5 to your computer and use it in GitHub Desktop.
Bookmarlet to max clap on Medium
<a href="javascript:(function(){var a=new MouseEvent('mouseup',{bubbles:!0}),b=new MouseEvent('mousedown',{bubbles:!0}),c=document.querySelector('.js-postActionsFooter button[data-action=multivote]');var d=0;var e=setInterval(function(){var f=document.querySelector('.js-floatingMultirecommendCount'),g=parseInt(f&&f.textContent||-1,10);(50===g||100<d)&&(c.dispatchEvent(a),clearInterval(e)),d++},500);c.dispatchEvent(b)})()">Max Clap</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment