PageSourceSearch

https://funktechnik-dathe.de/plugins/kk_dropper/drops/KK_Popup/js/popup.js?v=1.0.12

js funktechnik-dathe.de collected 2026-09-26 03:00:09 UTC 5,411 bytes, 1 lines download raw bytes

1!function(o,e){var KK_PopupDrop=function(o,e){this.init(o,e)};KK_PopupDrop.OPEN_POPUPS=[],KK_PopupDrop.KNOWN_POPUPS=[],KK_PopupDrop._normalizeName=function(o){return o.trim().replace(/ /g,"").toLowerCase()},KK_PopupDrop.getPopup=function(o){for(var e=0;e<KK_PopupDrop.KNOWN_POPUPS.length;e++){var t=KK_PopupDrop.KNOWN_POPUPS[e],i=KK_PopupDrop._normalizeName(t.options.name);if(KK_PopupDrop._normalizeName(o)===i||o.trim()===t.options.id.trim())return t}return null},KK_PopupDrop.prototype={init:function(e,t){var i=this;KK_PopupDrop.KNOWN_POPUPS.push(i),o&&o.fn&&o.fn.modal?(i.$elem=o(e),i.options=o.extend({},t),i.eventNamespace="kk_popup_"+i.options.runtimeId,i.isDestroyed=!1,i.isVisible=!1,i.wasVisible=!1,i.ajaxContentLoaded=!1,t.useAjax||(i.$modal=i.$elem.find(".kk-popup-modal:first"),i._install()),(i.options.name||i.options.id)&&o("body").on("click."+i.eventNamespace,"[data-popup]",(function(e){if(!i.destroyed()){var t=o(this).attr("data-popup");if(t&&t.trim()){t=KK_PopupDrop._normalizeName(t);var n=i.options.id;t!==KK_PopupDrop._normalizeName(i.options.name)&&t!==n||(e.preventDefault(),e.stopPropagation(),i.open())}}})),i._installActivation(),i._openOnGetParameter()):setTimeout((function(){i.init(e,t)}),1e3)},_installActivation:function(){var e=this,t=!!e.options.blocked;switch(e.options.mode){case"indirect":return;case"time":if(t)return;return void setTimeout((function(){e.open()}),1e3*e.options.timeDelay);case"scroll":if(t)return;return void o(window).scroll((function(t){e.isVisible||e.wasVisible||o(window).scrollTop()>=e.options.scrollDistance&&e.open()}));case"click":return void(e.options.clickSelector&&o("body").on("click."+e.eventNamespace,e.options.clickSelector,(function(o){e.destroyed()||(o.preventDefault(),o.stopPropagation(),e.open())})));case"leave":if(t)return;return o(document).mouseleave((function(o){e.wasVisible||o.clientX>0&&o.clientX<window.innerWidth&&o.clientY>0&&o.clientY<window.innerHeight||(e._leaveTimeout=setTimeout((function(){e.open()}),1e3*e.options.leaveDelay||0))})),void o(document).mouseenter((function(){clearTimeout(e._leaveTimeout)}));case"instant":default:if(t)return;return void e.open()}},_install:function(){var e=this;for(var t in e.options.footerBtnActions)e.$modal.find("[data-btn-guid="+t+"]").click(o.proxy((function(){this(e)}),e.options.footerBtnActions[t]));setTimeout((function(){e.$modal.appendTo("body")})),e.$modal.data("bs.modal")&&e.$modal.data("bs.modal",null),e.$modal.modal({keyboard:!!e.options.closeable,backdrop:!!e.options.useBackdrop&&(!!e.options.closeable||"static"),show:!1}),e.$modal.on("hide.bs.modal",(function(){e._updateOpenState(!1)})),e.$modal.on("show.bs.modal",(function(){e._updateOpenState(!0)})),e.$modal.on("shown.bs.modal",(function(){e.$modal.focus()}))},open:function(){var o=this;o.isVisible||o.destroyed()||-1===["click","indirect"].indexOf(o.options.mode)&&KK_PopupDrop.OPEN_POPUPS.length||(o.options.useAjax&&!o.ajaxContentLoaded?o._loadAjax((function(){o.$modal.modal("show")})):setTimeout((function(){o.$modal.modal("show")})),o._updateOpenState(!0),o.wasVisible=!0,o._setCookie())},_openOnGetParameter:function(){var o=decodeURIComponent((RegExp("kk-popup=(.+?)(&|$)").exec(location.search)||[,""])[1]),e="null"!==o&&o;if(e){var t=KK_PopupDrop._normalizeName(this.options.name);KK_PopupDrop._normalizeName(e)!==t&&e.trim()!==this.options.id.trim()||this.open()}},close:function(){this.isVisible&&(this.$modal.modal("hide"),this._updateOpenState(!1))},toggle:function(){this.isVisible?this.close():this.open()},_setCookie:function(){if(this.options.once){var o="kk_popup_"+this.options.id,e=new Date;e.setTime(e.getTime()+60*this.options.lifetime*60*1e3);var t=o+"=true"+(this.options.lifetime?"; expires="+e.toUTCString():"");document.cookie=t}},_loadAjax:function(t){var i=this;i.options.useAjax&&!i.ajaxContentLoaded&&e.io(i.options.id,{init:!1,samePage:!0}).call("renderModal",null,(function(e,n){e?console.log("Popup Drop error: "+e):(i.$modal=o(n),i._install(),i.ajaxContentLoaded=!0,"function"==typeof t&&t(i))}))},_updateOpenState:function(o){var e=KK_PopupDrop.OPEN_POPUPS.indexOf(this);
1if(this.isVisible=!!o,o&&e<0){if(e>=0)return;KK_PopupDrop.OPEN_POPUPS.push(this)}else!o&&e>=0&&(KK_PopupDrop.OPEN_POPUPS.splice(e,1),this.pauseVideos())},pauseVideos(){this.$modal.find('iframe[src*="youtube"], iframe[src*="vimeo"], video').each((function(){var e=o(this);try{e.is("iframe")&&this.contentWindow&&this.contentWindow.postMessage?(this.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),this.contentWindow.postMessage('{"method": "pause"}',"*")):e.is("video")&&this.pause&&this.pause()}catch(o){console.log(o)}}))},destroyed:function(){return!!this.isDestroyed||!o.contains(document,this.$elem.get(0))&&(this.destroy(),!0)},destroy:function(){this.close(),o("body").off("."+this.eventNamespace),this.$modal&&(this.$modal.off("hide.bs.modal"),this.$modal.off("show.bs.modal"),this.$modal.off("shown.bs.modal"),this.$modal.remove()),this.$elem.remove();var e=KK_PopupDrop.KNOWN_POPUPS.indexOf(this);e>=0&&KK_PopupDrop.KNOWN_POPUPS.splice(e,1),(e=KK_PopupDrop.OPEN_POPUPS.indexOf(this))>=0&&KK_PopupDrop.OPEN_POPUPS.splice(e,1),this.isDestroyed=!0}},window.KK_PopupDrop=KK_PopupDrop,o((function(){o("body").on("hidden.bs.modal",".modal",(function(e){o(".modal:visible").length&&o("body").addClass("modal-open")}))}
1))}(window.jQuery,window.DropperFramework);

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.