Advertisement
captmicro

Unknown

Dec 5th, 2010
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. // ==UserScript==
  2. // @name BUX.TO.HAX
  3. // @description BUX.TO Autoclicker
  4. // @author CaptMicro
  5. // @match http://www.bux.to/surf.php
  6. // @match http://www.bux.to/view.php?ad=*
  7. // @run-at document-end
  8. // ==/UserScript==
  9.  
  10. var BTH_CurrentAddWindow = false;
  11. var BTH_WaitTimer = 0;
  12.  
  13. function BT_GetNumValidAds()
  14. {
  15. var adlinks = document.getElementsByClassName('al4');
  16. if (adlinks.length > 0) return adlinks.length;
  17. return 0;
  18. }
  19.  
  20. function BT_GetNextValidAd()
  21. {
  22. var adlinks = document.getElementsByClassName('al4');
  23. if (adlinks.length > 0) return adlinks[0].getAttribute('href');
  24. return false;
  25. }
  26.  
  27. function BTH_CreatePanel()
  28. {
  29. buxtohax = document.createElement('div'); buxtohax.id = 'buxtohax';
  30. buxtohax.setAttribbute('style', 'align:center;text-align:center;border:1px solid #FF0000;');
  31. buxtohax.innerHTML = [
  32. '<span style="text-align:center;">[BUX.<text style="color:#AFCD20;">TO</text>.HAX]</span>',
  33. '<table style="width:100%;border:none;font-size:1em;">',
  34. ' <tr><td style="width:20%;">Refresh Timer:</td>',
  35. ' <td style="width:80%;" id="buxtohax_nxttimer">Unknown</td></tr>',
  36. ' <tr><td style="width:20%;">Current Ad:</td>',
  37. ' <td style="width:80%;" id="buxtohax_adcurr">Unknown</td></tr>',
  38. ' <tr><td style="width:20%;">Current Ad Timer:</td>',
  39. ' <td style="width:80%;" id="buxtohax_adtimer">Unknown</td></tr>'
  40. ' <tr><td style="width:20%;">Ads Left:</td>',
  41. ' <td style="width:80%;" id="buxtohax_adsleft">Unknown</td></tr>',
  42. '</table>',
  43. ].join('\n');
  44. var midinfo = document.getElementsByClassName('midinfo')[0];
  45. var header = document.getElementsByClassName('header')[0];
  46. midinfo.insertBefore(buxtohax, header.nextSibling);
  47. }
  48.  
  49. function BTH_UpdateLoop()
  50. {
  51. if (BTH_CurrentAddWindow.x != "Done")
  52. {
  53. if (BTH_WaitTimer != 0) BTH_WaitTimer = 0;
  54. document.getElementById('buxtohax_nxttimer').innerHTML = "Wiating for ad...";
  55. document.getElementById('buxtohax_adcurr').innerHTML = BTH_CurrentAddWindow.name;
  56. document.getElementById('buxtohax_adtimer').innerHTML = BTH_CurrentAddWindow.x;
  57. document.getElementById('buxtohax_adsleft').innerHTML = BT_GetNumValidAds();
  58. }
  59. else
  60. {
  61. if (BTH_WaitTimer == 0) BTH_WaitTimer = Math.floor(Math.random() * 11) + 6;
  62. document.getElementById('buxtohax_nxttimer').innerHTML = BTH_WaitTimer;
  63. BTH_WaitTimer = BTH_WaitTimer - 1;
  64. if (BTH_WaitTimer == 0) { window.location.reload(); }
  65. }
  66. setTimeout("BTH_UpdateLoop()", 1000);
  67. }
  68.  
  69. function BTH_NextAd()
  70. {
  71. if (BTH_CurrentAddWindow != false)
  72. {
  73. BTH_CurrentAddWindow.close();
  74. BTH_CurrentAddWindow = false;
  75. }
  76. var adhref = BT_GetNextValidAd();
  77. if (adhref == false) return false;
  78. var adfull = 'http://www.bux.to/' + adhref;
  79. BTH_CurrentAddWindow = window.open(adfull);
  80. BTH_UpdateLoop();
  81. }
  82.  
  83. BTH_CreatePanel();
  84. BTH_NextAd();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement