Server IP : 162.0.217.223 / Your IP : 216.73.216.153 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/yeslicense.org/wp-content/plugins/squirrly-seo/view/assets/js/ |
Upload File : |
(function($){"use strict";var sqs_script="kr";$(document).keypress(function(event){var keycode=event.keyCode||event.which;if(keycode==13){$(".sqd-submit:visible").trigger("click")}});$.sq_steps=function(step){$(".sq_step").hide();$(".sq_step"+step).show()};$.fn.sq_getSuggested=function(){var $this=this;if($("input[name=sq_input_keyword]").val()===""){$.sq_showMessage("Add a keyword first",2e3);return}var $keywords=$("input[name=sq_input_keyword]").val();var $country=$("select[name=sq_select_country] option:selected").val();var $language=$("select[name=sq_select_language] option:selected").val();$.sq_setCookie("sq_country",$country);$.sq_setCookie("sq_language",$language);if($keywords!==""){$.sq_steps(2);$this.find(".sq_suggestions").addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_others",keyword:$keywords,country:$country,lang:$language,sq_nonce:sqQuery.nonce}).done(function(response){$this.find(".sq_suggestions").removeClass("sq_minloading");var $count=0;if(typeof response.keywords!=="undefined"&&response.keywords!==null&&response.keywords.length>0){$this.find(".sq_suggested").each(function(){if(typeof response.keywords[$count]!=="undefined"){$(this).html('<input type="checkbox" id="sq_input_keywords'+$count+'" name="sq_input_keywords[]" class="sq_input_keywords custom-control-input" value="'+response.keywords[$count]+'"><label class="custom-control-label" for="sq_input_keywords'+$count+'">'+response.keywords[$count]+"</label>");$count++}else{$(this).hide()}});var limit=3;$this.find("input.sq_input_keywords").on("change",function(evt){if($this.find("input.sq_input_keywords:checked").length>limit){$(this).prop("checked",false);alert($this.find("div.text-danger").text())}})}else if(typeof response.error!=="undefined"&&response.error==="limit_exceeded"){$this.find(".sq_suggestions > div").hide();$this.find(".sq_limit_exceeded").show()}else if(typeof response.error!=="undefined"&&response.error==="no_data"){$this.find(".sq_suggestions > div").hide();$this.find(".sq_research_error").show()}}).fail(function(){$this.find(".sq_suggestions").removeClass("sq_minloading").show();$this.prepend('<div class="text-center text-warning">Squirrly Library loading error. Please contact us at support@squirrly.co</div>')})}};$.fn.sq_getResearch=function($count){var $this=this;$.sq_steps(3);$this.find(".btn").hide();var $loadingdiv=$("div.sq_step3").find(".sq_loading_steps");var $keywords=$("input[name=sq_input_keyword]").val();var $post_id=$("input[name=post_id]").val();var $process=0;var $table=$("div.sq_step3 table");var $country=$("select[name=sq_select_country] option:selected").val();var $language=$("select[name=sq_select_language] option:selected").val();$.sq_setCookie("sq_country",$country);$.sq_setCookie("sq_language",$language);if(typeof $count==="undefined"){$count=10}$("input.sq_input_keywords:checked").each(function(){$keywords+=","+$(this).val()});if($.fn.DataTable.isDataTable($table)){$table.DataTable().destroy();$table.find("tbody").html("");$table.hide();$this.off("sq_research_loaded");$(".sq_research_success").hide();$loadingdiv.hide()}$this.addClass("sq_loading");var $loadingstep=1;$loadingdiv.show();$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show();$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",keywords:$keywords,country:$country,lang:$language,count:$count,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.removeClass("sq_loading");$loadingdiv.hide();$.sq_showMessage(response.error,1e4).addClass("sq_error")}else{if(typeof response.id!=="undefined"){$process=response.id}$this.trigger("sq_research_loaded")}},"json");$this.on("sq_research_loaded",function(){if($process){$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_process",id:$process,post_id:$post_id,sq_nonce:sqQuery.nonce}).done(function(response){if(typeof response.error!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage(response.error,1e4).addClass("sq_error")}if(typeof response.done!=="undefined"&&response.done&&typeof response.html!=="undefined"){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$table.find("tbody").html(response.html);$table.show();$(".sq_research_success").show();$(".sq_tips").show();$table.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});$table.find(".sq_label_manage_popup").each(function(){$(this).sq_listenLabels()});$table.find(".sq_research_add_innerlinks").each(function(){$(this).on("click",function(){$(this).sq_addInnerlinks()})});$.extend($.fn.dataTableExt.oSort,{"formatted-value-pre":function(a){return $("<div></div>").append(a).find("span").data("value")},"formatted-value-asc":function(a,b){return a-b},"formatted-value-desc":function(a,b){return b-a}});$table.DataTable({columnDefs:[{targets:[5,6],sortable:false},{targets:[2,3,4],sortable:true,type:"formatted-value"}],sDom:"Rfrtlip",bPaginate:false,bLengthChange:true,iDisplayLength:50,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],bFilter:true,fixedColumns:true})}else{$loadingstep++;if($loadingstep<=9){$loadingdiv.find(".sq_loading_step").hide();$loadingdiv.find(".sq_loading_step"+$loadingstep).show()}if($loadingstep>50){$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Lost connection with the server. Please make sure you whitelisted the IP from https://api.squirrly.co",1e4).addClass("sq_error")}setTimeout(function(){$this.trigger("sq_research_loaded")},5e3)}}).fail(function(){$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$(".sq_research_timeout_error").show()},"json")}else{$this.off("sq_research_loaded");$this.removeClass("sq_loading");$loadingdiv.hide();$this.find(".btn").show();$.sq_showMessage("Could not start the research on our server. Please check again in a minute.",1e4).addClass("sq_error")}});return $this};$.fn.sq_getHistory=function(){var $this=this;var $id=$this.data("id");var $destination=$($this.data("destination"));if(!$destination.length){if(!$("#history"+$id).length){$destination=$('<tr id="history'+$id+'"></tr>');$this.parents("tr:last").after($destination);$destination.show()}}else{$($destination).remove();return}if($($destination).is(":visible")){$this.addClass("sq_minloading");$.post(sqQuery.ajaxurl,{action:"sq_ajax_research_history",id:$this.data("id"),sq_nonce:sqQuery.nonce}).done(function(response){$this.removeClass("sq_minloading");if(typeof response.html!=="undefined"){$destination.html(response.html)}$destination.find(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});$destination.find(".sq_label_manage_popup").each(function(){$(this).sq_listenLabels()});$destination.find(".sq_research_add_innerlinks").each(function(){$(this).on("click",function(){$(this).sq_addInnerlinks()})})}).fail(function(){$this.removeClass("sq_minloading");$destination.html('<td colspan="4" class="col-sm-12 text-center my-3 text-danger">Could not find the records</td>')},"json")}};$(document).ready(function(){$(".sq_history_details").on("click",function(){$(this).sq_getHistory()});$(".sq_research_add_briefcase").each(function(){$(this).on("click",function(){$(this).sq_addBriefcase()})});$(".sq_label_manage_popup").each(function(){$(this).sq_listenLabels()});$(".sq_research_add_innerlinks").each(function(){$(this).on("click",function(){$(this).sq_addInnerlinks()})});$(".dropdown-toggle").dropdown()})})(jQuery);