1jQuery(document).ready(function($) { 2 'use strict'; 3 //Thumb and hot function 4 $(document).on("click", ".hotcountbtn:not(.alreadyhot)", function(e){ 5 e.preventDefault(); 6 var $this = $(this); 7 if ($this.hasClass('restrict_for_guests')) { 8 return false; 9 } 10 var post_id = $(this).data("post_id"); 11 var informer = parseInt($(this).attr("data-informer")); 12 13 if($this.hasClass('thumbplus')){ 14 var actioncounter = 'hot'; 15 $this.addClass("loading"); 16 $this.addClass('alreadyhot').parent().find('.thumbminus').addClass('alreadyhot'); 17 }else if($this.hasClass('hotplus')){ 18 var actioncounter = 'hot'; 19 $this.addClass('alreadyhot').parent().parent().find('.hotminus').addClass('alreadyhot'); 20 $('#textinfo' + post_id + '').html("<i class='rhicon rhi-spinner fa-spin'></i>"); 21 }else if($this.hasClass('thumbminus')){ 22 var actioncounter = 'cold'; 23 $this.addClass("loading"); 24 $this.addClass('alreadyhot').parent().find('.thumbplus').addClass('alreadyhot'); 25 }else if($this.hasClass('hotminus')){ 26 var actioncounter = 'cold'; 27 $this.addClass('alreadyhot').parent().parent().find('.hotplus').addClass('alreadyhot'); 28 $('#textinfo' + post_id + '').html("<i class='rhicon rhi-spinner fa-spin'></i>"); 29 } 30 $.ajax({
31 type: "post", 32 url: rhscriptvars.ajax_url, 33 data: "action=hot-count&hotnonce="+rhscriptvars.hotnonce+"&hot_count="+actioncounter+"&post_id="+post_id 34 }).done( 35 function(count){ 36 if($this.hasClass('thumbplus')){ 37 $this.removeClass("loading"); 38 informer=informer+1; 39 $this.closest('.post_thumbs_wrap').find('#thumbscount' + post_id + '').text(informer); 40 $this.attr("data-informer",informer); 41 }else if($this.hasClass('hotplus')){ 42 $('#textinfo' + post_id + '').html(''); 43 informer=informer+1; 44 $('#temperatur' + post_id + '').text(informer+"°"); 45 if(informer>rhscriptvars.max_temp){ informer=rhscriptvars.max_temp; } 46 if(informer<rhscriptvars.min_temp){ informer=rhscriptvars.min_temp; } 47 if(informer>=0){ 48 $('#scaleperc' + post_id + '').css("width", informer / rhscriptvars.max_temp * 100+'%').removeClass('cold_bar'); 49 $('#temperatur' + post_id + '').removeClass('cold_temp'); 50 } 51 else { 52 $('#scaleperc' + post_id + '').css("width", informer / rhscriptvars.min_temp * 100+'%'); 53 } 54 }else if($this.hasClass('thumbminus')){ 55 $this.removeClass("loading"); 56 informer=informer-1; 57 $this.closest('.post_thumbs_wrap').find('#thumbscount' + post_id + '').text(informer); 58 }else if($this.hasClass('hotminus')){ 59 $('#textinfo' + post_id + '').html(''); 60 informer=informer-1; 61 $('#temperatur' + post_id + '').text(informer+"°"); 62 if(informer<rhscriptvars.min_temp){ informer=rhscriptvars.min_temp; } 63 if(informer>rhscriptvars.max_temp){ informer=rhscriptvars.max_temp; } 64 if(informer<0){ 65 $('#scaleperc' + post_id + '').css("width", informer / rhscriptvars.min_temp * 100+'%').addClass('cold_bar'); 66 $('#temperatur' + post_id + '').addClass('cold_temp'); 67 } 68 else { 69 $('#scaleperc' + post_id + '').css("width", informer / rhscriptvars.max_temp * 100+'%'); 70 } 71 } 72 }); 73 return false; 74 }); 75});
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.