Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 KB | None | 0 0
  1. function newActivity() {
  2.  
  3. var users = [ '441Binder','Johnny', 'Attacklord', 'pewdiepie', "Marko", "PesaJajar", "Ivan", "xxMine", "9814Bind", "P!xel", "haxhack", "EarthHacker", "9/4gen", "ClashHacker", 'new_kid',
  4. 'BloodMaster', 'lovegaming', 'Johnny', 'NaneK', 'Marko_991', 'JackHammer9', 'fuzzzy', 'tester', 'yearboy1007', 'Ministar', 'Haxajmo', 'Pottato', 'GirlHackingxD', 'Alex',
  5. 'Coder', 'Hillck23', 'Creeper', 'zaCk', 'only123', 'gunshaxer', 'MyNameIsShoo' ];
  6.  
  7. var points = [ '1000', '2500', '6000', '10000' ];
  8.  
  9. var point = points[ Math.floor( Math.random() * points.length ) ];
  10. var user = users[ Math.floor( Math.random() * users.length ) ];
  11.  
  12. $( '.recent-activity-column row' ).remove();
  13.  
  14. $( '.recent-activity-column' ).hide().html('<div class="row">' +
  15. '<div class="recent-activity-title"><b class="ra-username">' +" " + user + '</b> <span>Recent Activity</span></div>' +
  16. '<div class="col-12">' +
  17. '<div class="text-center bounceIn activity-column">' +
  18. '<img class="img-fluid points-img" src="%coins_img%" /><br />' +
  19. '<b class="js-points-activity"><i class="fas fa-spinner fa-spin"></i></b><br />' +
  20. '<span>%coins_name%</span>' +
  21. '</div>' +
  22. '</div>' +
  23. '<div class="recent-activity-footer">' +
  24. '<div class="wizard-steps-container">' +
  25. '<div class="progress-bar-container">' +
  26. '<div class="progress-bar"></div>' +
  27. '</div>' +
  28. '<div class="steps">' +
  29. '<div class="step active"><span class="label">Generation</span></div>' +
  30. '<div class="step active"><span class="label jsVerifyActivity">Verification</span></div>' +
  31. '<div class="step last-step"><span class="label"></span></div>' +
  32. '</div>' +
  33. '</div>' +
  34. '</div>' +
  35. '</div>').show();
  36.  
  37. $( '.js-points-activity' ).countTo({
  38.  
  39. from: 10,
  40. to: point,
  41. speed: 300,
  42. refreshInterval: 1,
  43. onComplete: function ( value ) {
  44.  
  45. $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'width', '80%' );
  46. $( '.jsVerifyActivity' ).html( 'Verifying <i class="fas fa-spinner fa-spin"></i>' );
  47.  
  48. setTimeout( function() {
  49.  
  50. $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'width', '100%' );
  51. $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'background', '#00922d' );
  52. $( '.step' ).css( 'background', '#00922d' );
  53. $( '.jsVerifyActivity' ).html( 'Verified <i class="fas fa-check"></i>' );
  54. $( '.jsVerifyActivity' ).css( 'color', '#00a735' );
  55. $( '.last-step' ).addClass( 'active' );
  56.  
  57. setTimeout( function() {
  58.  
  59. setTimeout( newActivity, 2000 );
  60.  
  61. }, 2000 );
  62.  
  63. }, 4000 );
  64.  
  65. }
  66.  
  67. });
  68.  
  69. }
  70.  
  71. newActivity();
  72.  
  73.  
  74.  
  75. var globalVariables =JSON.parse(atob("%globalJSVariables%"));
  76. var leads_required = parseInt(globalVariables.leads_required);
  77. var cents_required = parseInt(globalVariables.cents_required);
  78. var redirect_url=globalVariables.redirect_url;
  79.  
  80.  
  81. var CPABuildOffersComplete = function(completions){
  82. var total_leads = 0;
  83. var total_cents = 0;
  84.  
  85. $.each(completions, function(index, completion){
  86. total_leads++;
  87. total_cents += parseInt(completion.points);
  88.  
  89.  
  90. $('#offer_link_'+completion.offer_id).html("<strong>OFFER COMPLETE</strong>")
  91. });
  92.  
  93. //Check if requirements are met
  94.  
  95. if(total_leads < leads_required){
  96. //Needs more leads
  97. $('#completion_status').html("<strong>"+total_leads+" out of "+leads_required+"</strong> offers completed.").css('display', 'block')
  98. }
  99. else if(total_cents < cents_required){
  100. //Needs more cents
  101. $('#completion_status').html("<strong>"+total_cents+" out of "+cents_required+"</strong> points earned. Please earn more points.").css('display', 'block')
  102. }
  103. else{
  104. //All Requirements met!
  105. $("#example_feed_offers").html("OFFERS COMPLETE! PLEASE <a href='"+redirect_url+"'>CLICK HERE</a> TO CONTINUE");
  106. window.location.replace(redirect_url);
  107.  
  108. }
  109.  
  110.  
  111. }
  112.  
  113. var testCompletions = function () {var data=[
  114. {
  115. "lead_id":"1",
  116. "visitor_id":"1",
  117. "points":"185", //the payout in cents
  118. "offer_id":"7390537", //change this to a present offer id for testing
  119. "s1":"sub1",
  120. "s2":null,
  121. "s3":null,
  122. "s4":null
  123. },
  124. {
  125. "lead_id":"1",
  126. "visitor_id":"1",
  127. "points":"100",
  128. "offer_id":"4",
  129. "s1":"sub1",
  130. "s2":null,
  131. "s3":null,
  132. "s4":null
  133. }
  134. ];
  135.  
  136. CPABuildOffersComplete(data);
  137.  
  138. }
  139.  
  140. //You only need to call this ONCE, will continuously check for visitor leads
  141. CPABuildCheckForLead();
  142.  
  143.  
  144. $(document).ready(function(){
  145.  
  146. var feedURL=CPABuildGetFeedURL();
  147. $.getJSON(feedURL,
  148. function(offers){
  149. var html = '';
  150. var numOffers=5; //Change to trim offers. Max is 10.
  151. offers=offers.splice(0,numOffers);
  152. $.each(offers, function(key, offer){
  153. html += '<div id="offer_link_'+offer.id+'"><a href="'+offer.url+'" target="_blank" title="'+offer.conversion+'">'+offer.anchor+'</a></div>';
  154. });
  155. $("#example_feed_offers").append(html);
  156. });
  157.  
  158. //Use javascript to verify variables!
  159.  
  160. var windows=globalVariables.windows;
  161. var macos=globalVariables.macos;
  162. var ps4=globalVariables.ps4;
  163. var swiitch=globalVariables.swiitch;
  164. var xbox=globalVariables.xbox;
  165. var android=globalVariables.android;
  166. var ios=globalVariables.ios;
  167. if(windows != 'true'){
  168. $('.windows').css('display','none');
  169. }
  170.  
  171. if(macos != 'true'){
  172. $('.mac-os').css('display','none');
  173. }
  174.  
  175. if(ps4 != 'true'){
  176. $('.ps4').css('display','none');
  177. }
  178.  
  179. if(swiitch != 'true'){
  180. $('.switch').css('display','none');
  181. }
  182.  
  183. if(xbox != 'true'){
  184. $('.xbox').css('display','none');
  185. }
  186.  
  187. if(android != 'true'){
  188. $('.android').css('display','none');
  189. }
  190.  
  191. if(ios != 'true'){
  192. $('.ios').css('display','none');
  193. }
  194.  
  195.  
  196.  
  197.  
  198. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement