Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name BUX.TO.HAX
- // @description BUX.TO Autoclicker
- // @author CaptMicro
- // @match http://www.bux.to/surf.php
- // @match http://www.bux.to/view.php?ad=*
- // @run-at document-end
- // ==/UserScript==
- var BTH_CurrentAddWindow = false;
- var BTH_WaitTimer = 0;
- function BT_GetNumValidAds()
- {
- var adlinks = document.getElementsByClassName('al4');
- if (adlinks.length > 0) return adlinks.length;
- return 0;
- }
- function BT_GetNextValidAd()
- {
- var adlinks = document.getElementsByClassName('al4');
- if (adlinks.length > 0) return adlinks[0].getAttribute('href');
- return false;
- }
- function BTH_CreatePanel()
- {
- buxtohax = document.createElement('div'); buxtohax.id = 'buxtohax';
- buxtohax.setAttribbute('style', 'align:center;text-align:center;border:1px solid #FF0000;');
- buxtohax.innerHTML = [
- '<span style="text-align:center;">[BUX.<text style="color:#AFCD20;">TO</text>.HAX]</span>',
- '<table style="width:100%;border:none;font-size:1em;">',
- ' <tr><td style="width:20%;">Refresh Timer:</td>',
- ' <td style="width:80%;" id="buxtohax_nxttimer">Unknown</td></tr>',
- ' <tr><td style="width:20%;">Current Ad:</td>',
- ' <td style="width:80%;" id="buxtohax_adcurr">Unknown</td></tr>',
- ' <tr><td style="width:20%;">Current Ad Timer:</td>',
- ' <td style="width:80%;" id="buxtohax_adtimer">Unknown</td></tr>'
- ' <tr><td style="width:20%;">Ads Left:</td>',
- ' <td style="width:80%;" id="buxtohax_adsleft">Unknown</td></tr>',
- '</table>',
- ].join('\n');
- var midinfo = document.getElementsByClassName('midinfo')[0];
- var header = document.getElementsByClassName('header')[0];
- midinfo.insertBefore(buxtohax, header.nextSibling);
- }
- function BTH_UpdateLoop()
- {
- if (BTH_CurrentAddWindow.x != "Done")
- {
- if (BTH_WaitTimer != 0) BTH_WaitTimer = 0;
- document.getElementById('buxtohax_nxttimer').innerHTML = "Wiating for ad...";
- document.getElementById('buxtohax_adcurr').innerHTML = BTH_CurrentAddWindow.name;
- document.getElementById('buxtohax_adtimer').innerHTML = BTH_CurrentAddWindow.x;
- document.getElementById('buxtohax_adsleft').innerHTML = BT_GetNumValidAds();
- }
- else
- {
- if (BTH_WaitTimer == 0) BTH_WaitTimer = Math.floor(Math.random() * 11) + 6;
- document.getElementById('buxtohax_nxttimer').innerHTML = BTH_WaitTimer;
- BTH_WaitTimer = BTH_WaitTimer - 1;
- if (BTH_WaitTimer == 0) { window.location.reload(); }
- }
- setTimeout("BTH_UpdateLoop()", 1000);
- }
- function BTH_NextAd()
- {
- if (BTH_CurrentAddWindow != false)
- {
- BTH_CurrentAddWindow.close();
- BTH_CurrentAddWindow = false;
- }
- var adhref = BT_GetNextValidAd();
- if (adhref == false) return false;
- var adfull = 'http://www.bux.to/' + adhref;
- BTH_CurrentAddWindow = window.open(adfull);
- BTH_UpdateLoop();
- }
- BTH_CreatePanel();
- BTH_NextAd();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement