PageSourceSearch

https://disue.com/themes/theme-Joe3/assets/lib/favico/favico.min.js

js disue.com collected 2026-10-06 13:14:56 UTC 8,787 bytes, 1 lines download raw bytes

1!function(){var e=function(r){"use strict";r=r||{};var i,a,l,s,h,f,c,n,t,o,d,y,u,w,g,x,m={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1,win:window};(u={}).ff="undefined"!=typeof InstallTrigger,u.chrome=!!window.chrome,u.opera=!!window.opera||0<=navigator.userAgent.indexOf("Opera"),u.ie=!1,u.safari=0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor"),u.supported=u.chrome||u.ff||u.opera;var p=[];n=y=!(d=function(){});var b={ready:function(){n=!0,b.reset(),d();},reset:function(){n&&(o=t=!(p=[]),f.clearRect(0,0,s,l),f.drawImage(c,0,0,s,l),M.setIcon(h),window.clearTimeout(w),window.clearTimeout(g));}};b.start=function(){if(n&&!o){if(0<p.length){o=!0;var e=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in p[0].options&&(i[e]=p[0].options[e]);}),T.run(p[0].options,function(){t=p[0],o=!1,0<p.length&&(p.shift(),b.start());},!1);};t?T.run(t.options,function(){e();},!0):e();}}};var v={},C=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=s*e.x,e.y=l*e.y,e.w=s*e.w,e.h=l*e.h,e.len=(""+e.n).length,e;};v.circle=function(e){var t=!1;2===(e=C(e)).len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):3<=e.len&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),f.clearRect(0,0,s,l),f.drawImage(c,0,0,s,l),f.beginPath(),f.font=i.fontStyle+" "+Math.floor(e.h*(99<e.n?.85:1))+"px "+i.fontFamily,f.textAlign="center",t?(f.moveTo(e.x+e.w/2,e.y),f.lineTo(e.x+e.w-e.h/2,e.y),f.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),f.lineTo(e.x+e.w,e.y+e.h-e.h/2),f.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),f.lineTo(e.x+e.h/2,e.y+e.h),f.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),f.lineTo(e.x,e.y+e.h/2),f.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):f.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),f.fillStyle="rgba("+i.bgColor.r+","+i.bgColor.g+","+i.bgColor.b+","+e.o+")",f.fill(),f.closePath(),f.beginPath(),f.stroke(),f.fillStyle="rgba("+i.textColor.r+","+i.textColor.g+","+i.textColor.b+","+e.o+")","number"==typeof e.n&&999<e.n?f.fillText((9999<e.n?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):f.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),f.closePath();},v.rectangle=function(e){2===(e=C(e)).len?(e.x=e.x-.4*e.w,e.w=1.4*e.w):3<=e.len&&(e.x=e.x-.65*e.w,e.w=1.65*e.w),f.clearRect(0,0,s,l),f.drawImage(c,0,0,s,l),f.beginPath(),f.font=i.fontStyle+" "+Math.floor(e.h*(99<e.n?.9:1))+"px "+i.fontFamily,f.textAlign="center",f.fillStyle="rgba("+i.bgColor.r+","+i.bgColor.g+","+i.bgColor.b+","+e.o+")",f.fillRect(e.x,e.y,e.w,e.h),f.fillStyle="rgba("+i.textColor.r+","+i.textColor.g+","+i.textColor.b+","+e.o+")","number"==typeof e.n&&999<e.n?f.fillText((9999<e.n?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):f.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),f.closePath();};function E(e){if(e.paused||e.ended||y)return!1;try{f.clearRect(0,0,s,l),f.drawImage(e,0,0,s,l);}catch(e){}g=setTimeout(function(){E(e);},T.duration),M.setIcon(h);}var M={};function A(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,o,n){return t+t+o+o+n+n;});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return!!t&&{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};}function I(e,t){var o,n={};for(o in e)n[o]=e[o];for(o in t)n[o]=t[o];return n;}M.getIcon=function(){var e=!1;return i.element?e=i.element:i.elementId?(e=x.getElementById(i.elementId)).setAttribute("href",e.getAttribute("src")):!1===(e=function(){for(var e=x.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length-1;0<=t;t--)if(/(^|\s)icon(\s|$)/i.test(e[t].getAttribute("rel")))return e[t];return!1;}())&&((e=x.createElement("link")).setAttribute("rel","icon"),x.getElementsByTagName("head")[0].appendChild(e)),e.setAttribute("type","image/png"),e;},M.setIcon=function(e){var t=e.toDataURL("image/png");if(i.dataUrl&&i.dataUrl(t),i.element)i.element.setAttribute("href",t),i.element.setAttribute("src",t);else if(i.elementId){var o=x.getElementById(i.elementId);o.setAttribute("href",t),o.setAttribute("src",t);}else if(u.ff||u.opera){var n=a;
1a=x.createElement("link"),u.opera&&a.setAttribute("rel","icon"),a.setAttribute("rel","icon"),a.setAttribute("type","image/png"),x.getElementsByTagName("head")[0].appendChild(a),a.setAttribute("href",t),n.parentNode&&n.parentNode.removeChild(n);}else a.setAttribute("href",t);};var T={duration:40,types:{}};return T.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],T.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],T.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],T.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],T.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],T.run=function(e,t,o,n){var r=T.types[x.hidden||x.msHidden||x.webkitHidden||x.mozHidden?"none":i.animation];n=!0===o?void 0!==n?n:r.length-1:void 0!==n?n:0,t=t||function(){},n<r.length&&0<=n?(v[i.type](I(e,r[n])),w=setTimeout(function(){o?n-=1:n+=1,T.run(e,t,o,n);},T.duration),M.setIcon(h)):t();},function(){(i=I(m,r)).bgColor=A(i.bgColor),i.textColor=A(i.textColor),i.position=i.position.toLowerCase(),i.animation=T.types[""+i.animation]?i.animation:m.animation,x=i.win.document;var e=-1<i.position.indexOf("up"),t=-1<i.position.indexOf("left");if(e||t)for(var o=0;o<T.types[""+i.animation].length;o++){var n=T.types[""+i.animation][o];e&&(n.y<.6?n.y=n.y-.4:n.y=n.y-2*n.y+(1-n.w)),t&&(n.x<.6?n.x=n.x-.4:n.x=n.x-2*n.x+(1-n.h)),T.types[""+i.animation][o]=n;}i.type=v[""+i.type]?i.type:m.type,a=M.getIcon(),h=document.createElement("canvas"),c=document.createElement("img"),a.hasAttribute("href")?(c.setAttribute("crossOrigin","anonymous"),c.onload=function(){l=0<c.height?c.height:32,s=0<c.width?c.width:32,h.height=l,h.width=s,f=h.getContext("2d"),b.ready();},c.setAttribute("src",a.getAttribute("href"))):(c.onload=function(){s=l=32,c.height=l,c.width=s,h.height=l,h.width=s,f=h.getContext("2d"),b.ready();},c.setAttribute("src",""));}(),{badge:function(e,o){o=("string"==typeof o?{animation:o}:o)||{},d=function(){try{if("number"==typeof e?0<e:""!==e){var t={type:"badge",options:{n:e}};if("animation"in o&&T.types[""+o.animation]&&(t.options.animation=""+o.animation),"type"in o&&v[""+o.type]&&(t.options.type=""+o.type),["bgColor","textColor"].forEach(function(e){e in o&&(t.options[e]=A(o[e]));}),["fontStyle","fontFamily"].forEach(function(e){e in o&&(t.options[e]=o[e]);}),p.push(t),100<p.length)throw new Error("Too many badges requests in queue.");b.start();}else b.reset();}catch(e){throw new Error("Error setting badge. Message: "+e.message);}},n&&d();},video:function(e){d=function(){try{if("stop"===e)return y=!0,b.reset(),void(y=!1);e.addEventListener("play",function(){E(this);},!1);}catch(e){throw new Error("Error setting video. Message: "+e.message);}},n&&d();},image:function(r){d=function(){try{var e=r.width,t=r.height,o=document.createElement("img"),n=e/s<t/l?e/s:t/l;o.setAttribute("crossOrigin","anonymous"),o.onload=function(){f.clearRect(0,0,s,l),f.drawImage(o,0,0,s,l),M.setIcon(h);},o.setAttribute("src",r.getAttribute("src")),o.height=t/n,o.width=e/n;}catch(e){throw new Error("Error setting image. Message: "+e.message);}},n&&d();},webcam:function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e;}),u.supported){var t=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,d=function(){try{if("stop"===e)return y=!0,b.reset(),void(y=!1);(t=document.createElement("video")).width=s,t.height=l,navigator.getUserMedia({video:!0,audio:!1},function(e){t.src=URL.createObjectURL(e),t.play(),E(t);},function(){});}catch(e){throw new Error("Error setting webcam. Message: "+e.message);}},n&&d();}}
1,reset:b.reset,browser:{supported:u.supported}};};"undefined"!=typeof define&&define.amd?define([],function(){return e;}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e;}();

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.