Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. // ==UserScript==
  2. // @name heart it all - by sleeplessbrendan
  3. // @include
  4. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  5. // @require https://gist.github.com/raw/2625891/waitForKeyElements.js
  6. // @grant GM_addStyle
  7. // @match *://www.7cups.com/member/connect/conversation.php?c=*
  8. // @grant none
  9. // @run-at document-end
  10. // ==/UserScript==
  11. /*- The @grant directive is needed to work around a major design change
  12. introduced in GM 1.0.
  13. It restores the sandbox.
  14. */
  15.  
  16. // dont share this or itll get patched
  17.  
  18.  
  19.  
  20. waitForKeyElements ("span.compassionHeartFade", clickOnHeartButton);
  21.  
  22. function clickOnHeartButton (jNode) {
  23. var clickEvent = document.createEvent ('MouseEvents');
  24. clickEvent.initEvent ('click', true, true);
  25. jNode[0].dispatchEvent (clickEvent);
  26. return;
  27.  
  28. }
  29.  
  30.  
  31.  
  32. // setTimeout(function(){location.reload(); }, 3*1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement