File "pp-magic-wand-helper.js"

Full path: /home/kosmetik/public_html/wp-content/plugins/powerpack-elements/assets/js/pp-magic-wand-helper.js
File size: 1.64 B
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

"use strict";window.XdUtils=window.XdUtils||function(){return{extend:function(e,n){var t,i=n||{};for(t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}}}(),window.xdLocalStorage=window.xdLocalStorage||function(){var e,n="cross-domain-local-message",t={iframeId:"cross-domain-iframe",iframeUrl:void 0,initCallback:function(){}},i=-1,a={},o=!1,r=!0;function d(e){var i;try{i=JSON.parse(e.data)}catch(e){}i&&i.namespace===n&&("iframe-ready"===i.id?(r=!0,t.initCallback()):function(e){a[e.id]&&(a[e.id](e),delete a[e.id])}(i))}function c(t,o,r,d){a[++i]=d;var c={namespace:n,id:i,action:t,key:o,value:r};e.contentWindow.postMessage(JSON.stringify(c),"*")}function u(n){t=XdUtils.extend(n,t);var i=document.createElement("div");window.addEventListener?window.addEventListener("message",d,!1):window.attachEvent("onmessage",d),i.innerHTML='<iframe id="'+t.iframeId+'" src='+t.iframeUrl+' style="display: none;"></iframe>',document.body.appendChild(i),e=document.getElementById(t.iframeId)}function l(){return!!o&&!!r}function s(){return"complete"===document.readyState}return{init:function(e){if(!e.iframeUrl)throw"Please specify the iframe URL";o||(o=!0,s()?u(e):document.addEventListener?document.addEventListener("readystatechange",function(){s()&&u(e)}):document.attachEvent("readystatechange",function(){s()&&u(e)}))},setItem:function(e,n,t){l()&&c("set",e,n,t)},getItem:function(e,n){l()&&c("get",e,null,n)},removeItem:function(e,n){l()&&c("remove",e,null,n)},key:function(e,n){l()&&c("key",e,null,n)},getSize:function(e){l()&&c("size",null,null,e)},getLength:function(e){l()&&c("length",null,null,e)},clear:function(e){l()&&c("clear",null,null,e)},wasInit:function(){return o}}}();