/
var
/
www
/
barefootlaw.org
/
wp-content
/
plugins
/
bdthemes-prime-slider-lite
/
includes
/
live-copy
/
assets
/
Upload File
HOME
"use strict";window.XdUtils=window.XdUtils||{extend:function(e,n){var t,i=n||{};for(t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}},window.BdThemesLiveCopyLocalStorage=window.BdThemesLiveCopyLocalStorage||function(){var e,n={iframeId:"bdt-live-copy-cross-domain-iframe",iframeUrl:void 0,initCallback:function(){}},t=-1,i={},o=!1,a=!0;function r(e){var t;try{t=JSON.parse(e.data)}catch(e){}t&&"cross-domain-local-message"===t.namespace&&("iframe-ready"===t.id?(a=!0,n.initCallback()):function(e){i[e.id]&&(i[e.id](e),delete i[e.id])}(t))}function c(n,o,a,r){t++,i[t]=r;var c={namespace:"cross-domain-local-message",id:t,action:n,key:o,value:a};e.contentWindow.postMessage(JSON.stringify(c),"*")}function l(t){n=XdUtils.extend(t,n);var i=document.createElement("div");window.addEventListener?window.addEventListener("message",r,!1):window.attachEvent("onmessage",r),i.innerHTML='<iframe id="'+n.iframeId+'" src="'+n.iframeUrl+'" style="display: none;"></iframe>',document.body.appendChild(i),e=document.getElementById(n.iframeId)}function d(){return o?!!a||(console.log("You must wait for iframe ready message before using the api."),!1):(console.log("You must call BdThemesLiveCopyLocalStorage.init() before using it."),!1)}function s(){return"complete"===document.readyState}return{init:function(e){if(!e.iframeUrl)throw"You must specify iframeUrl";o?console.log("BdThemesLiveCopyLocalStorage was already initialized!"):(o=!0,s()?l(e):document.addEventListener?document.addEventListener("readystatechange",(function(){s()&&l(e)})):document.attachEvent("readystatechange",(function(){s()&&l(e)})))},setItem:function(e,n,t){d()&&c("set",e,n,t)},getItem:function(e,n){d()&&c("get",e,null,n)},removeItem:function(e,n){d()&&c("remove",e,null,n)},key:function(e,n){d()&&c("key",e,null,n)},getSize:function(e){d()&&c("size",null,null,e)},getLength:function(e){d()&&c("length",null,null,e)},clear:function(e){d()&&c("clear",null,null,e)},wasInit:function(){return o}}}();