Untitled


SUBMITTED BY: Guest

DATE: July 28, 2014, 2:57 p.m.

FORMAT: JavaScript

SIZE: 5.2 kB

HITS: 594

  1. // ==UserScript==
  2. // @name www.Probux.com
  3. // @namespace ----------
  4. // @include *://*probux.com/viewads.php
  5. // @include *://*probux.com/view.php*
  6. // @include *://*probux.com/progrid.php
  7. // @include *://*probux.com/gridview.php*
  8. // @version 1.0.2
  9. // ==/UserScript==
  10. if( wparent.location.href.indexOf('viewads.php') != -1 && top == self){
  11. var arr = [],ctr = 0;
  12. var div = $('<div>');
  13. var clickNum = ctr + 1 ;
  14. var loading = 0;
  15. div.css({zIndex:1000000,textAlign:'center',padding:5,position:'fixed',width:399,height:20,background:'#AFFFAF',border:'2px solid green',bottom:10,right:10})
  16. .text('clicking: '+clickNum+' loading : '+ loading);
  17. $('body').css({position:'relative'}).append(div);
  18. $.each($('.anc-style'),function(k,v){
  19. objj[k];
  20. if($(v).attr('onclick')){
  21. if($(v).attr('onclick').indexOf('./view.php?') >= 0 && !$('.anuncio-clicked-title',$(v)).size()){
  22. var obj = {
  23. href : $(v).attr('onclick').match(/'[^]+'/)[0].replace(/'/,''),
  24. jObj : $(v)
  25. }
  26. arr.push(obj);
  27. }
  28. }
  29. });
  30. console.log(arr.length);
  31. console.log(arr);
  32. function rec(ctr){
  33. loading = 0;
  34. if(arr[ctr]){
  35. wparent.open(arr[ctr].href,"","width=100,height=100,top=1000,left=20000");
  36. div.text('clicking : '+clickNum+' / '+ arr.length +' - loading : '+ loading);
  37. }
  38. else{
  39. var timeReload=120000;
  40. var inters = setInterval(function(){
  41. timeReload-=1000;
  42. div.text("reloading :"+timeReload);
  43. if(timeReload == 0){
  44. clearInterval(inters)
  45. window.location.reload()
  46. }
  47. },1000);
  48. }
  49. }
  50. rec(ctr);
  51. wparent.success = function(r){
  52. if(r == 'retry'){
  53. setTimeout(function(){rec(ctr);});
  54. }
  55. else{
  56. arr[ctr].jObj.text('done').css({background: '#000',color:'#FFF'});
  57. ctr++;
  58. clickNum = ctr + 1;
  59. setTimeout(function(){rec(ctr);});
  60. }
  61. }
  62. }
  63. if(wparent.location.href.indexOf('view.php?') != -1||wparent.location.href.indexOf('gridview.php?') != -1){
  64. var div = $('<div>');
  65. var ajaxCall = false;
  66. div.css({zIndex:1000000,textAlign:'center',padding:5,position:'fixed',width:85,height:20,background:'#AFFFAF',border:'2px solid green',bottom:10,right:10})
  67. .text('');
  68. $('html').css({position:'relative'}).append(div);
  69. $('iframe:last').load(function(){
  70. var timers = (wparent.cnt / 10)
  71. var inters = setInterval(function(){
  72. div.text('loading: '+ (wparent.cnt--) +'%')
  73. if(wparent.cnt == 99 && ajaxCall){
  74. clearInterval(inters)
  75. setTimeout(function(){
  76. window.onbeforeunload = null;
  77. wparent.opener.success('');
  78. wparent.close();
  79. },1000)
  80. }
  81. if(wparent.cnt == -5 ){
  82. setTimeout(function(){
  83. window.onbeforeunload = null;
  84. wparent.opener.success('');
  85. wparent.close();
  86. },1000)
  87. }
  88. },1000);
  89. })
  90. jQuery.ajaxSetup({
  91. beforeSend: function(){
  92. ajaxCall = true
  93. },
  94. complete:function(a,b){
  95. console.log(a)
  96. console.log(b)
  97. if(a.statusText.toLowerCase() == 'ok'){
  98. setTimeout(function(){
  99. window.onbeforeunload = null;
  100. wparent.opener.success('');
  101. wparent.close();
  102. },1000)
  103. ;
  104. }else{
  105. window.onbeforeunload = null;
  106. wparent.opener.success('retry');
  107. wparent.close();
  108. }
  109. }
  110. })
  111. }
  112. if(wparent.location.href.indexOf('progrid.php') != -1){
  113. var div = $('<div>');
  114. var arr = [],ctr = 0;
  115. var clickNum = ctr + 1 ;
  116. var loading = 0;
  117. div.css({zIndex:1000000,textAlign:'center',padding:5,position:'fixed',width:85,height:20,background:'#AFFFAF',border:'2px solid green',bottom:10,right:10})
  118. .text('');
  119. $('html').css({position:'relative'}).append(div);
  120. var myChances = $('#myChances').text()
  121. for(i=0;i<myChances;i++){
  122. var lft = Math.floor((Math.random()*30))+1;
  123. var rgt = Math.floor((Math.random()*20))+1;
  124. var obj = {
  125. href : 'gridview.php?x='+lft+'&y='+rgt
  126. }
  127. arr.push(obj);
  128. }
  129. console.log(arr.length);
  130. console.log(arr);
  131. function rec(ctr){
  132. loading = 0;
  133. if(arr[ctr]){
  134. wparent.open(arr[ctr].href,"","width=100,height=100,top=1000,left=20000");
  135. div.text('clk : '+clickNum+' / '+ arr.length);
  136. }
  137. else{
  138. var timeReload=120000;
  139. var inters = setInterval(function(){
  140. timeReload-=1000;
  141. div.text("reloading :"+timeReload);
  142. if(timeReload == 0){
  143. clearInterval(inters)
  144. window.location.reload()
  145. }
  146. },1000);
  147. }
  148. }
  149. rec(ctr);
  150. wparent.success = function(r){
  151. if(r == 'retry'){
  152. setTimeout(function(){rec(ctr);});
  153. }
  154. else{
  155. ctr++;
  156. clickNum = ctr + 1;
  157. setTimeout(function(){rec(ctr);});
  158. }
  159. }
  160. }

comments powered by Disqus