Advertisement
Guest User

Untitled

a guest
Jan 12th, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        premiumleech
  3. // @namespace   premiumleech
  4. // @include     http://generator.premiumleech.com/link/*.html
  5. // @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  6. // @grant    GM_addStyle
  7. // ==/UserScript==
  8. /*- The @grant directive is needed to work around a design change
  9.     introduced in GM 1.0.   It restores the sandbox.
  10. */
  11.  
  12. /*
  13. <p class="leech-btn"><button onclick="javascript:window.open('http://generator.premiumleech.com/redir/BtPpnGJv2HcZRa2BTxsEQzUdDQbb6WO1','_blank');">Leech it!</button></p>
  14. */
  15. /*
  16. /html/body/div[2]/div/section/p[2]
  17. */
  18.  
  19. var targBtn = $("#content > p.leech-btn > button");
  20. if (targBtn.length) {
  21.     targBtn[0].click ();
  22. }
  23. /*
  24. var targBtn = $("body > div:eq(1) > div:first > div:first > p.leech-btn > button");
  25. if (targBtn.length) {
  26.     targBtn[0].click ();
  27. }
  28. */
  29. /*
  30. function searchKeyPress(e)
  31.     {
  32.         // look for window.event in case event isn't passed in
  33.         if (typeof e == 'undefined' && window.event) { e = window.event; }
  34.         if (e.keyCode == 13)
  35.         {
  36.             document.getElementById('btnSearch').click();
  37.         }
  38.     }
  39. */
  40. /*
  41. function clickc()
  42. {
  43. var el = document.querySelector("_blank");
  44. var evt = document.createEvent("MouseEvents");
  45. event.initMouseEvent("click", true, true, window,
  46.             0, 0, 0, 0, 0,
  47.             false, false, false, false,
  48.             0, null);
  49. el.dispatchEvent(evt);
  50. }
  51. window.setTimeout(clickc, 0);
  52. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement