1$(document).ready(function(){ 2 ChecUserkAuth(); 3 4 $(document).on('click','.user-list-option', function(e) { 5 e.stopPropagation(); 6 if($(this).next().hasClass("show")){ 7 $(this).next().removeClass("show"); 8 }else{ 9 $(".drop-down-open-menu").removeClass("show"); 10 $(this).next().addClass("show"); 11 } 12 }); 13 14 $(document).on('click','.ddbtn', function(e) { 15 e.stopPropagation(); 16 if($(this).next().hasClass("show")){ 17 $(this).next().removeClass("show"); 18 }else{ 19 $(".drop-down-open-menu").removeClass("show"); 20 $(this).next().addClass("show"); 21 } 22 }); 23 $(document).on('click','.ddbtn2', function(e) { 24 e.stopPropagation(); 25 if($(this).next().hasClass("show")){ 26 $(this).next().removeClass("show"); 27 }else{ 28 $(".drop-down-open-menu-list-edit").removeClass("show"); 29 $(this).next().addClass("show"); 30 } 31 }); 32 $(document).click(function(){ 33 $(".drop-down-open-menu").removeClass("show"); 34 }); 35 $(document).on('click','.drop-input', function(e) { 36 e.stopPropagation(); 37 return false; 38 }); 39 40 $(document).on('click','.call-modals', function(e) { 41 var modal_name=$(this).attr('modal_name'); 42 $('#'+modal_name).show(); 43 }); 44 $(document).on('click','.close', function(e) { 45 $('.modal').hide(); 46 }); 47 $(document).on('click','.btn-close', function(e) { 48 $('.modal').hide(); 49 }); 50 if($(window).width() <= 480){ 51 $('.main-content').css('margin-left', '0px'); 52 $('#menu-taggle-sidebar').addClass('eject-rotated'); 53 $('#menu-taggle-sidebar').attr('current_state','full'); 54 $('#menu-taggle-sidebar').parent().after('<div class="menu-taggle toggle-logo"><a id="menu-taggle-sidebar-logo" current_state="side" href="/"><img src="/static/pipileads/assets/img/dashboard-logo.svg"></a></div>') 55 } 56 $(document).on('click','#menu-taggle-sidebar', function(e) { 57 if($(this).attr('current_state')=='side'){ 58 $('.sidebar').css('margin-left', '-270px'); 59 $('.main-content').css('margin-left', '0px'); 60 $('.main-content').css('width', '100%'); 61 $(this).addClass('eject-rotated'); 62 $(this).attr('current_state','full'); 63 $(this).parent().after('<div class="menu-taggle toggle-logo"><a id="menu-taggle-sidebar-logo" current_state="side" href="/"><img src="/static/pipileads/assets/img/dashboard-logo.svg"></a></div>') 64 if($(window).width() <= 480){ 65 $('.lead-action-section').show(); 66 } 67 e.preventDefault(); 68 }else{ 69 $('.sidebar').css('margin-left', '0px'); 70 $('.main-content').css('margin-left', '270px'); 71 $('.main-content').css('width', 'calc(100% - 270px)'); 72 $('.toggle-logo').remove(); 73 $(this).attr('current_state','side'); 74 $(this).removeClass('eject-rotated'); 75 if($(window).width() <= 480){ 76 $('.lead-action-section').hide(); 77 } 78 } 79 }); 80 81 $(document).on('click','.pipi-auth-logout', function(e) { 82 localStorage.removeItem('token'); 83 window.postMessage({ type: "PipiAuthTokenOperation",method:"PipiAuthTokenLogout" }, "*"); 84 }); 85 $(document).on('click','.accordion-head', function(e) { 86 if($(this).parent().hasClass('accordion-active')){ 87 $(this).parent().removeClass('accordion-active'); 88 } 89 else{ 90 $('.accordion').removeClass('accordion-active'); 91 $(this).parent().addClass('accordion-active'); 92 } 93 94 }); 95}); 96function checkExtensionInstalled(){ 97 98 var checkExist = setInterval(function() { 99 if(!$('#pipileads-extension-installed').length){ 100 if($(window).width() > 480) 101 $('.extension-not-installed-section').show(); 102 $('#install-chrome-tool-info').show(); 103 } 104 }, 1000); // check every 100ms 105} 106function ChecUserkAuth(){ 107if(localStorage.getItem('token')!=null&localStorage.getItem('token')!=undefined){ 108 var token=localStorage.getItem('token'); 109 $.ajaxSetup({ 110 headers: { 111 'Authorization': 'Token '+token 112 }, 113 global: false, 114 type: 'GET' 115}) 116$.get('/get-user-details/', '', function (response) { 117 if(response.email){ 118 $('#menu-signin').parent().remove(); 119 $('#menu-signup').attr('href','/app'); 120 $('#menu-signup').text(`Hi ${response.first_name}, Go to Dashboard`); 121 $('#menu-signup1').parent().remove(); 122 checkExtensionInstalled(); 123 } 124 else{ 125 return false; 126 } 127}).fail(function() { 128 return false; 129 }); 130} 131} 132 133function CMA(){ 134 var currentURL = window.location.pathname; 135 if(currentURL.indexOf('/activate/')!==-1){
136 const url_paths=currentURL.split('/'); 137 const uid=url_paths[3]; 138 const token=url_paths[4]; 139 if(localStorage.getItem('uid')==null||localStorage.getItem('uid')==undefined){ 140 localStorage.setItem('uid',uid+token); 141 }else{ 142 const olduid=localStorage.getItem('uid'); 143 const newuid=uid+token; 144 if(olduid!==newuid){ 145 $.get(`/app/cma-true/?uid=${uid}&token=${token}`, '', function (response) { 146 return false; 147 }).fail(function() { 148 return false; 149 }); 150 } 151 } 152 } 153}
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.