PageSourceSearch

https://newsocialbookmarkingsite.com/assets/js/common.js

js newsocialbookmarkingsite.com collected 2026-09-24 10:19:42 UTC 6,664 bytes, 28 lines download raw bytes

1jQuery(document).ready(function(){
2    jQuery("body").on('click','#ajax_pagingsearc0 a',function(){var url=jQuery(this).attr("href");var keyword=$('.searchBox').val();var type=$('.searchBox').attr('data-type');jQuery('#ajax_pagingsearc0 li.active').removeClass('active');jQuery(this).parent('li').addClass('active');jQuery('#wait').show();jQuery.ajax({type:"GET",beforeSend:function(){$("#loader-section").css('display','block');},complete:function(){$("#loader-section").css('display','none');},data:{keyword:keyword,type:type,ajax:1},url:url,success:function(msg){jQuery(".allRecords").html(msg);jQuery('#wait').hide();}});return false;});jQuery(document).on('keypress','.validNumber',function(eve){if(eve.which==0){return true;}else{if(eve.which=='.'){eve.preventDefault();}
3if((eve.which!=46||$(this).val().indexOf('.')!=-1)&&(eve.which<48||eve.which>57)){if(eve.which!=8)
4{eve.preventDefault();}}
5$('.validNumber').keyup(function(eve){if($(this).val().indexOf('.')==0){$(this).val($(this).val().substring(1));}});}});jQuery('body').on('keypress','.charonly',function(e){var regex=new RegExp("^[a-zA-Z\s ]+$");var str=String.fromCharCode(!e.charCode?e.which:e.charCode);if(!regex.test(str)){e.preventDefault();return true;}});jQuery('body').on('keyup','.searchBox',function(){var value=jQuery(this).val().trim();var type=jQuery(this).attr('data-type');var seg=jQuery(this).attr('data-seg');var idd=jQuery(this).attr('data-id');if(idd!='undefined')
6var uurl=site_url+'search/'+type+'/'+value;else
7var uurl=site_url+'search/'+type+'/'+value+'/'+idd;console.log(uurl);if(value=='')
8value='empty';$.ajax({type:'get',dataType:'html',beforeSend:function(){$("#loader-section").css('display','block');},complete:function(){$("#loader-section").css('display','none');},url:uurl,success:function(data){jQuery(".allRecords").html(data);}});});jQuery('.modal').on('hidden.bs.modal',function(e){jQuery('.form-control').removeClass('has-error');jQuery('.form-group.has-error').removeClass('has-error');jQuery('label.has-error').remove();jQuery('.form-control').removeClass('error');jQuery('.form-group.error').removeClass('error');jQuery('label.error').remove();var id=jQuery(this).attr('id');jQuery('#'+id).find('input[type="text"]').val('');jQuery('#'+id).find('input[type="hidden"]').val('');jQuery('#'+id).find('input[type="button"]').removeAttr('disabled');jQuery('#'+id).find('input[type="submit"]').removeAttr('disabled');jQuery('#'+id).find('button[type="button"]').removeAttr('disabled');jQuery('#'+id).find('button[type="submit"]').removeAttr('disabled');jQuery('#'+id).find('video').remove();jQuery('#'+id).find('textarea').val('');jQuery('#'+id).find('select').val('');jQuery('.category_ref').val('');});jQuery(document).on('click','.ajax_update_btn',function()
9{var id=jQuery(this).attr('data-id');var type=jQuery(this).attr('data-type');if(id!='')
10{jQuery.ajax({type:"GET",beforeSend:function(){$("#loader-section").css('display','block');},complete:function(){$("#loader-section").css('display','none');},dataType:"json",url:site_url+'edit/'+type+'/'+id,success:function(msg){if(type=='story')
11{jQuery('#modal-default2').modal('show');jQuery('.articleTitle').val(msg.articleTitle);jQuery('.story_ref').val(msg.story_ref);jQuery('.tag').val(msg.tag);jQuery('.description').val(msg.description);jQuery('#category').val(msg.category);jQuery('.url').val(msg.url);}}});}else{jQuery('#modal-default').modal('show');}});jQuery(document).on('click','.ajax_update_btn2',function()
12{var id=jQuery(this).attr('data-id');var type=jQuery(this).attr('data-type');var subid=jQuery(this).attr('data-subid');jQuery('.category_name').val('');CKEDITOR.instances['editor2'];if(subid=='')
13{jQuery('.maincategory_ref').val(id);jQuery('#modal-default2').modal('show');}else
14if(id!='')
15{jQuery.ajax({type:"GET",beforeSend:function(){$("#loader-section").css('display','block');},complete:function(){$("#loader-section").css('display','none');},dataType:"json",url:site_url+'edit/'+type+'/'+id,success:function(msg){if(type=='subsubcategory')
16{console.log('ghghgh');jQuery('#modal-default2').modal('show');jQuery('.category_name').val(msg.category_name);jQuery('.category_ref').val(msg.category_ref);CKEDITOR.instances['editor1'].setData(msg.description)}}});}else{}});jQuery('body').on('click','.ajax_status_btn',function()
17{var id=jQuery(this).attr('data-id');var type=jQuery(this).attr('data-type');if(id!='')
18{jQuery('#confirm_delete').modal('show');jQuery("#confirm_delete").attr('data-id',id);jQuery("#confirm_delete").attr('data-type',type);}});jQuery(document).on('click','.comfirm_delete_data',function()
19{var uId=jQuery("#confirm_delete").attr('data-id');var type=jQuery("#confirm_delete").attr('data-type');if(jQuery(this).attr('id')=='yes')
20{jQuery.ajax({type:'delete',url:site_url+'delete/'+jQuery("#confirm_delete").attr('data-type')+'/'+jQuery("#confirm_delete").attr('data-id'),cache:false,dataType:"json",beforeSend:function(){$("#loader-section").css('display','block');},success:function(data){if(data.success==true)
21{jQuery('#confirm_delete').modal('hide');jQuery('#rowId'+uId).remove();$('.successDiv').fadeOut(2000).html(data.alertMsg);}},complete:function(){$("#loader-section").css('display','none');},error:function(xhr){}});}});jQuery('body').on('click','.cat_disabled',function(e){var data={success:"Information",success_message:"Make sure the category should be active first!"};tost(data);});jQuery(document).on('click','.deleteImg',function(){jQuery('.absolute_img').hide();jQuery('.imageDelete').val('1');});});function ajaxHit1(string,type){return jQuery.ajax({type:"GET",url:string,beforeSend:function(){jQuery("#loader-section").show()},complete:function(){jQuery("#loader-section").hide()},data:{},dataType:type});}
22function ajaxHit(siteUrl,getType,returnType,parameter,types=null)
23{jQuery.ajax({type:getType,url:siteUrl,beforeSend:function(){jQuery("#loader-section").show()},complete:function(){jQuery("#loader-section").hide()},data:{parameter:parameter},dataType:returnType,success:function(response){var delayTime=2000;if(response.success)
24{if(types=='get_web_title')
25{jQuery('.submit1').hide();jQuery('.submit2').css('display','block');jQuery('.urlApp').html(parameter);jQuery('#articleTitle').val(response.res);jQuery('#articleTitles').html(response.res);jQuery('.titlePrv').html(response.res);}
26$.toast({heading:'Success',text:response.success_message,loader:true,loaderBg:'#fff',showHideTransition:'fade',icon:'success',hideAfter:delayTime,position:'top-right'});}
27else
28{$.toast({heading:'Error',text:response.error_message,loader:true,loaderBg:'#fff',showHideTransition:'fade',icon:'error',hideAfter:delayTime,position:'top-right'});}}});}

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.