Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function newActivity() {
- var users = [ '441Binder','Johnny', 'Attacklord', 'pewdiepie', "Marko", "PesaJajar", "Ivan", "xxMine", "9814Bind", "P!xel", "haxhack", "EarthHacker", "9/4gen", "ClashHacker", 'new_kid',
- 'BloodMaster', 'lovegaming', 'Johnny', 'NaneK', 'Marko_991', 'JackHammer9', 'fuzzzy', 'tester', 'yearboy1007', 'Ministar', 'Haxajmo', 'Pottato', 'GirlHackingxD', 'Alex',
- 'Coder', 'Hillck23', 'Creeper', 'zaCk', 'only123', 'gunshaxer', 'MyNameIsShoo' ];
- var points = [ '1000', '2500', '6000', '10000' ];
- var point = points[ Math.floor( Math.random() * points.length ) ];
- var user = users[ Math.floor( Math.random() * users.length ) ];
- $( '.recent-activity-column row' ).remove();
- $( '.recent-activity-column' ).hide().html('<div class="row">' +
- '<div class="recent-activity-title"><b class="ra-username">' +" " + user + '</b> <span>Recent Activity</span></div>' +
- '<div class="col-12">' +
- '<div class="text-center bounceIn activity-column">' +
- '<img class="img-fluid points-img" src="%coins_img%" /><br />' +
- '<b class="js-points-activity"><i class="fas fa-spinner fa-spin"></i></b><br />' +
- '<span>%coins_name%</span>' +
- '</div>' +
- '</div>' +
- '<div class="recent-activity-footer">' +
- '<div class="wizard-steps-container">' +
- '<div class="progress-bar-container">' +
- '<div class="progress-bar"></div>' +
- '</div>' +
- '<div class="steps">' +
- '<div class="step active"><span class="label">Generation</span></div>' +
- '<div class="step active"><span class="label jsVerifyActivity">Verification</span></div>' +
- '<div class="step last-step"><span class="label"></span></div>' +
- '</div>' +
- '</div>' +
- '</div>' +
- '</div>').show();
- $( '.js-points-activity' ).countTo({
- from: 10,
- to: point,
- speed: 300,
- refreshInterval: 1,
- onComplete: function ( value ) {
- $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'width', '80%' );
- $( '.jsVerifyActivity' ).html( 'Verifying <i class="fas fa-spinner fa-spin"></i>' );
- setTimeout( function() {
- $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'width', '100%' );
- $( '.wizard-steps-container .progress-bar-container .progress-bar' ).css( 'background', '#00922d' );
- $( '.step' ).css( 'background', '#00922d' );
- $( '.jsVerifyActivity' ).html( 'Verified <i class="fas fa-check"></i>' );
- $( '.jsVerifyActivity' ).css( 'color', '#00a735' );
- $( '.last-step' ).addClass( 'active' );
- setTimeout( function() {
- setTimeout( newActivity, 2000 );
- }, 2000 );
- }, 4000 );
- }
- });
- }
- newActivity();
- var globalVariables =JSON.parse(atob("%globalJSVariables%"));
- var leads_required = parseInt(globalVariables.leads_required);
- var cents_required = parseInt(globalVariables.cents_required);
- var redirect_url=globalVariables.redirect_url;
- var CPABuildOffersComplete = function(completions){
- var total_leads = 0;
- var total_cents = 0;
- $.each(completions, function(index, completion){
- total_leads++;
- total_cents += parseInt(completion.points);
- $('#offer_link_'+completion.offer_id).html("<strong>OFFER COMPLETE</strong>")
- });
- //Check if requirements are met
- if(total_leads < leads_required){
- //Needs more leads
- $('#completion_status').html("<strong>"+total_leads+" out of "+leads_required+"</strong> offers completed.").css('display', 'block')
- }
- else if(total_cents < cents_required){
- //Needs more cents
- $('#completion_status').html("<strong>"+total_cents+" out of "+cents_required+"</strong> points earned. Please earn more points.").css('display', 'block')
- }
- else{
- //All Requirements met!
- $("#example_feed_offers").html("OFFERS COMPLETE! PLEASE <a href='"+redirect_url+"'>CLICK HERE</a> TO CONTINUE");
- window.location.replace(redirect_url);
- }
- }
- var testCompletions = function () {var data=[
- {
- "lead_id":"1",
- "visitor_id":"1",
- "points":"185", //the payout in cents
- "offer_id":"7390537", //change this to a present offer id for testing
- "s1":"sub1",
- "s2":null,
- "s3":null,
- "s4":null
- },
- {
- "lead_id":"1",
- "visitor_id":"1",
- "points":"100",
- "offer_id":"4",
- "s1":"sub1",
- "s2":null,
- "s3":null,
- "s4":null
- }
- ];
- CPABuildOffersComplete(data);
- }
- //You only need to call this ONCE, will continuously check for visitor leads
- CPABuildCheckForLead();
- $(document).ready(function(){
- var feedURL=CPABuildGetFeedURL();
- $.getJSON(feedURL,
- function(offers){
- var html = '';
- var numOffers=5; //Change to trim offers. Max is 10.
- offers=offers.splice(0,numOffers);
- $.each(offers, function(key, offer){
- html += '<div id="offer_link_'+offer.id+'"><a href="'+offer.url+'" target="_blank" title="'+offer.conversion+'">'+offer.anchor+'</a></div>';
- });
- $("#example_feed_offers").append(html);
- });
- //Use javascript to verify variables!
- var windows=globalVariables.windows;
- var macos=globalVariables.macos;
- var ps4=globalVariables.ps4;
- var swiitch=globalVariables.swiitch;
- var xbox=globalVariables.xbox;
- var android=globalVariables.android;
- var ios=globalVariables.ios;
- if(windows != 'true'){
- $('.windows').css('display','none');
- }
- if(macos != 'true'){
- $('.mac-os').css('display','none');
- }
- if(ps4 != 'true'){
- $('.ps4').css('display','none');
- }
- if(swiitch != 'true'){
- $('.switch').css('display','none');
- }
- if(xbox != 'true'){
- $('.xbox').css('display','none');
- }
- if(android != 'true'){
- $('.android').css('display','none');
- }
- if(ios != 'true'){
- $('.ios').css('display','none');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement