PageSourceSearch

https://www.smow.de/js/ext/easyzoom-3.17.11-min.js

js smow.de collected 2026-10-02 11:43:17 UTC 4,073 bytes, 1 lines download raw bytes

1!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(t){e(t)}):"object"==typeof module&&module.exports?module.exports=t.EasyZoom=e(require("jquery")):t.EasyZoom=e(t.jQuery)}(this,function(h){"use strict";var c,d,l,p,o,i,u=!1,f=!1,s={loadingNotice:"Loading image",errorNotice:"The image could not be loaded",errorDuration:2500,linkAttribute:"href",preventClicks:!0,beforeShow:h.noop,beforeHide:h.noop,onShow:h.noop,onHide:h.noop,onMove:h.noop};function a(t,e){this.$target=h(t),this.opts=h.extend({},s,e,this.$target.data()),void 0===this.isOpen&&this._init()}return a.prototype._init=function(){this.$image=this.$target.find("img"),this.$flyout=h('<div class="easyzoom-flyout" />'),this.$notice=h('<div class="easyzoom-notice" />'),this.$target.on({"mouseenter.easyzoom":h.proxy(this._onEnter,this),"mousemove.easyzoom":h.proxy(this._onMove,this),"mouseleave.easyzoom":h.proxy(this._onLeave,this),"contextmenu.easyzoom":h.proxy(this._onLeave,this)}),this.opts.preventClicks&&this.$target.on("click.easyzoom",function(t){t.preventDefault()})},a.prototype.show=function(t,e){var o=this;if(!1!==this.opts.beforeShow.call(this)){if(!this.isReady)return this._loadImage(this.$image.data("zoom-src"),function(){!o.isMouseOver&&e||o.show(t)});this.$target.append(this.$flyout);var i=this.$target.outerWidth(),s=this.$target.outerHeight(),h=this.$flyout.width(),a=this.$flyout.height(),n=this.$zoom.width(),r=this.$zoom.height();c=Math.ceil(n-h),d=Math.ceil(r-a),l=(c=c<0?0:c)/i,p=(d=d<0?0:d)/s,this.isOpen=!0,this.opts.onShow.call(this),this.$zoom.width()<=i&&(u=!0),this.$zoom.height()<=s&&(f=!0),t&&this._move(t)}},a.prototype._onEnter=function(t){this.isMouseOver=!0,t.preventDefault(),this.show(t,!0)},a.prototype._onMove=function(t){this.isOpen&&(t.preventDefault(),this._move(t))},a.prototype._onLeave=function(t){this.isMouseOver=!1,this.isOpen&&this.hide()},a.prototype._onLoad=function(t){t.currentTarget.width&&(this.isReady=!0,this.$notice.detach(),this.$flyout.html(this.$zoom),this.$target.removeClass("is-loading").addClass("is-ready"),t.data.call)&&t.data()},a.prototype._onError=function(){var t=this;this.$notice.text(this.opts.errorNotice),this.$target.removeClass("is-loading").addClass("is-error"),this.detachNotice=setTimeout(function(){t.$notice.detach(),t.detachNotice=null},this.opts.errorDuration)},a.prototype._loadImage=function(t,e){var o=new Image,i=this,s=setTimeout(function(){i.$target.addClass("is-loading").append(i.$notice.text(i.opts.loadingNotice))},750);this.$zoom=h(o).on("error",h.proxy(this._onError,this)).on("load",function(){try{clearTimeout(s)}catch(t){}}).on("load",e,h.proxy(this._onLoad,this)),o.style.position="absolute",o.src=t},a.prototype._move=function(t){i=0===t.type.indexOf("touch")?(e=t.touches||t.originalEvent.touches,o=e[0].pageX,e[0].pageY):(o=t.pageX||o,t.pageY||i);var e=this.$target.offset(),t=o-e.left,e=i-e.top,t=Math.ceil(t*l),e=Math.ceil(e*p),e=(t=c<(t=t<0?0:t)?c:t,-1*(d<(e=e<0?0:e)?d:e)),t=-1*t;u&&(t=this.$flyout.width()/2-this.$zoom.width()/2),f&&(e=this.$flyout.height()/2-this.$zoom.height()/2),this.$zoom.css({top:e,left:t}),this.opts.onMove.call(this,e,t)},a.prototype.hide=function(){this.isOpen&&!1!==this.opts.beforeHide.call(this)&&(this.$flyout.detach(),this.isOpen=!1,this.opts.onHide.call(this))},a.prototype.swap=function(t,e,o){this.hide(),this.isReady=!1,this.detachNotice&&clearTimeout(this.detachNotice),this.$notice.parent().length&&this.$notice.detach(),this.$target.removeClass("is-loading is-ready is-error"),this.$image.attr({src:t,srcset:Array.isArray(o)?o.join():o}),this.$image.data("zoom-src",e)},a.prototype.teardown=function(){this.hide(),this.$target.off(".easyzoom").removeClass("is-loading is-ready is-error"),this.detachNotice&&clearTimeout(this.detachNotice),delete this.$zoom,delete this.$image,delete this.$notice,delete this.$flyout,delete this.isOpen,delete this.isReady},h.fn.easyZoom=function(e){return this.each(function(){var t=h.data(this,"easyZoom");t?void 0===t.isOpen&&t._init():h.data(this,"easyZoom",new a(this,e))})},a});

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.