1var coreTP = { 2 3 getSocialProof: function(){ 4 $.ajaxSetup({ cache: false }); 5 6 $.ajax({ 7 url: site['site_url'] +"/ajax/tp.core.php?action=get.socialproof", 8 dataType: 'json', 9 success: function(response) { 10 if (response.status == "success") { 11 var social_proof = response.data; 12 13 $.each(social_proof, function(key, val) { 14 var toast_header = ' \ 15 <img src="'+ val.avatar +'" class="rounded mr-2" alt="'+ val.login +'" style="width:25px"> \ 16 <span class="mr-auto"><strong>'+ (val.name ? val.name : val.login) +'</strong> from '+ val.country +'</span> \ 17 <small>'+ val.time +'</small> \ 18 <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> \ 19 <span aria-hidden="true">×</span> \ 20 </button> \ 21 '; 22 23 var toast_body = ' \ 24 Has earned <b>'+ val.payout_vc +' COIN(s)</b> by completing <b>'+ val.offer_title +'</b> offer via <b>'+ val.module +'</b> \ 25 '; 26 27 coreTSW.showAjaxToast('', '', {header: toast_header, body: toast_body}, {link: '/offer/'+ val.module, text: 'Try '+ val.module +' offerwall'}); 28 }); 29 } else { 30 //fillComboKeywords(); 31 } 32 } 33 }); 34 }, 35 36 createCampaignLink: function(module, url) { 37 let link; 38 switch (module) { 39 case 'youtube.view': 40 link = `https://www.youtube.com/watch?v=${url}`; 41 break; 42 43 default: 44 link = url; 45 break; 46 } 47 return link; 48 }, 49 payoutTypeToAction: function(payoutType, offer) { 50 let text = ""; 51 const platform = offer.platform; 52 53 switch (payoutType) { 54 case 'cpc': 55 text = (platform === 'web') ? 'Open & Use Site' : 'Open & Use App'; 56 break; 57 case 'cpi': 58 text = (platform === 'web') ? 'Install & Use App' : 'Open & Use App'; 59 break; 60 case 'cpa': 61 const eventDescription = offer.event_description || ''; 62 text = eventDescription.replace( 63 /Install \+ Open|Install and open|Install|Download|Run/gi, 64 (matched) => { 65 switch (matched) { 66 case 'Install + Open': 67 case 'Install and open': 68 return 'Open & Use App'; 69 case 'Install': 70 case 'Download': 71 case 'Run': 72 return 'Open'; 73 default: 74 return matched; 75 } 76 } 77 ); 78 break; 79 default: 80 text = (platform === 'web') ? 'Install & Use App' : 'Open & Use App'; 81 break; 82 } 83 84 return `${text} ⢠New user only`; 85 }, 86 filterByOS: function(os){ 87 switch (os) { 88 case 'AND': 89 $(".filter").not('.android').hide('0'); 90 $('.filter').filter('.android').show('2000'); 91 break; 92 case 'IOS': 93 $(".filter").not('.ios').hide('0'); 94 $('.filter').filter('.ios').show('2000'); 95 break; 96 case 'WIN': 97 $(".filter").not('.windows').hide('0'); 98 $('.filter').filter('.windows').show('2000'); 99 100 $('.filter').filter('.android').show('2000'); // show android on desktop 101 $('.filter').filter('.ios').show('2000'); // show android on desktop 102 break; 103 104 default: 105 // 106 break; 107 } 108 109 $('.filter').filter('.web').show('2000'); 110 $('.filter').filter('.unspecified').show('2000'); 111 }, 112 calculatePayoutCoin: function(bid, usd_coin_rate = 1000) { 113 let payout_coin = bid * usd_coin_rate; 114 payout_coin = Math.floor(payout_coin * 100) / 100; 115 return payout_coin; 116 }, 117}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.