PageSourceSearch

https://miguelcontrerasfoundation.org/wp-content/plugins/geodirect…/js/jRating.jquery.min.js?ver=1.6.38

js miguelcontrerasfoundation.org collected 2026-10-05 08:12:14 UTC 4,218 bytes, 1 lines download raw bytes

1(function($){$.fn.jRating=function(op){var defaults={bigStarsPath:"jquery/icons/stars.png",smallStarsPath:"jquery/icons/small.png",phpPath:"php/jRating.php",type:"big",step:false,isDisabled:false,showRateInfo:true,canRateAgain:false,length:5,decimalLength:0,rateMax:20,rateInfosX:-45,rateInfosY:5,nbRates:1,onSuccess:null,onError:null,onTouchstart:null};if(this.length>0)return this.each(function(){var opts=$.extend(defaults,op),newWidth=0,starWidth=0,starHeight=0,bgPath="",hasRated=false,globalWidth=0,nbOfRates=opts.nbRates;if($(this).hasClass("jDisabled")||opts.isDisabled)var jDisabled=true;else var jDisabled=false;getStarWidth();$(this).height(starHeight);var average=parseFloat($(this).attr("data-average")),idBox=parseInt($(this).attr("data-id")),widthRatingContainer=starWidth*opts.length-1,widthColor=average/opts.rateMax*widthRatingContainer,quotient=$("<div>",{"class":"jRatingColor",css:{width:widthColor}}).appendTo($(this)),average=$("<div>",{"class":"jRatingAverage",css:{width:0,top:-starHeight}}).appendTo($(this)),jstar=$("<div>",{"class":"jStar",css:{width:widthRatingContainer,height:starHeight,top:-(starHeight*2),background:"url("+bgPath+") repeat-x"}}).appendTo($(this));if(widthColor>0){average.width(widthColor);quotient.width(0);hasRated=true;globalWidth=widthColor}$(this).css({width:widthRatingContainer,overflow:"hidden",zIndex:1,position:"relative"});if(!jDisabled)$(this).unbind().bind({mouseenter:function(e){var realOffsetLeft=findRealLeft(this);var relativeX=e.pageX-realOffsetLeft;if(opts.showRateInfo)var tooltip=$("<p>",{"class":"jRatingInfos",html:getNote(relativeX)+' <span class="maxRate">/ '+opts.rateMax+"</span>",css:{top:e.pageY+opts.rateInfosY,left:e.pageX+opts.rateInfosX}}).appendTo("body").show()},mouseover:function(e){$(this).css("cursor","pointer")},mouseout:function(){$(this).css("cursor","default");if(hasRated){average.width(globalWidth)}else{average.width(0)}},mousemove:function(e){var realOffsetLeft=findRealLeft(this);var relativeX=e.pageX-realOffsetLeft;if(opts.step)newWidth=Math.floor(relativeX/starWidth)*starWidth+starWidth;else newWidth=relativeX;average.width(newWidth);if(opts.showRateInfo)$("p.jRatingInfos").css({left:e.pageX+opts.rateInfosX}).html(getNote(newWidth)+' <span class="maxRate">/ '+opts.rateMax+"</span>")},mouseleave:function(){$("p.jRatingInfos").remove()},click:function(e){var element=this;hasRated=true;globalWidth=newWidth;nbOfRates--;if(!opts.canRateAgain||parseInt(nbOfRates)<=0)$(this).unbind().css("cursor","default").addClass("jDisabled");if(opts.showRateInfo)$("p.jRatingInfos").fadeOut("fast",function(){$(this).remove()});e.preventDefault();var rate=getNote(newWidth);average.width(newWidth);$(".datasSent p").html("<strong>idBox : </strong>"+idBox+"<br /><strong>rate : </strong>"+rate+"<br /><strong>action :</strong> rating");$(".serverResponse p").html("<strong>Loading...</strong>");if(opts.onSuccess)opts.onSuccess(element,rate)},touchstart:function(e){var element=this;var realOffsetLeft=findRealLeft(this);var xPos=e.originalEvent.touches[0].pageX;var relativeX=xPos-realOffsetLeft;if(opts.step)newWidth=Math.floor(relativeX/starWidth)*starWidth+starWidth;else newWidth=relativeX;hasRated=true;globalWidth=newWidth;nbOfRates--;if(!opts.canRateAgain||parseInt(nbOfRates)<=0)$(this).unbind().css("cursor","default").addClass("jDisabled");if(opts.showRateInfo)$("p.jRatingInfos").fadeOut("fast",function(){$(this).remove()});e.preventDefault();var rate=getNote(newWidth);average.width(newWidth);if(opts.onTouchstart)opts.onTouchstart(element,rate)}});function getNote(relativeX){var noteBrut=parseFloat(relativeX*100/widthRatingContainer*opts.rateMax/100);switch(opts.decimalLength){case 1:var note=Math.round(noteBrut*10)/10;break;case 2:var note=Math.round(noteBrut*100)/100;break;case 3:var note=Math.round(noteBrut*1e3)/1e3;break;default:var note=Math.round(noteBrut*1)/1}if(note>opts.rateMax){note=opts.rateMax}return note}function getStarWidth(){switch(opts.type){case"small":starWidth=12;starHeight=10;bgPath=opts.smallStarsPath;break;default:starWidth=23;starHeight=20;bgPath=opts.bigStarsPath}}function findRealLeft(obj){if(!obj)return 0;return obj.offsetLeft+findRealLeft(obj.offsetParent)}})}})(jQuery);

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.