X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..00dbffaf1593b0ac719d98f00839221a9ca52133:/wp-includes/js/customize-loader.js diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js index 4c7e0853..2ecbbe0f 100644 --- a/wp-includes/js/customize-loader.js +++ b/wp-includes/js/customize-loader.js @@ -1 +1,164 @@ -if(typeof wp==="undefined"){var wp={}}(function(a,c){var b=wp.customize,d;c.extend(c.support,{history:!!(window.history&&history.pushState),hashchange:("onhashchange" in window)&&(document.documentMode===undefined||document.documentMode>7)});d=c.extend({},b.Events,{initialize:function(){this.body=c(document.body);if(!d.settings||!c.support.postMessage||(!c.support.cors&&d.settings.isCrossDomain)){return}this.window=c(window);this.element=c('
').appendTo(this.body);this.bind("open",this.overlay.show);this.bind("close",this.overlay.hide);c("#wpbody").on("click",".load-customize",function(e){e.preventDefault();d.open(c(this).attr("href"))});if(c.support.history){this.window.on("popstate",d.popstate)}if(c.support.hashchange){this.window.on("hashchange",d.hashchange);this.window.triggerHandler("hashchange")}},popstate:function(g){var f=g.originalEvent.state;if(f&&f.customize){d.open(f.customize)}else{if(d.active){d.close()}}},hashchange:function(g){var f=window.location.toString().split("#")[1];if(f&&0===f.indexOf("wp_customize=on")){d.open(d.settings.url+"?"+f)}if(!f&&!c.support.history){d.close()}},open:function(f){var e;if(this.active){return}if(d.settings.browser.mobile){return window.location=f}this.active=true;this.body.addClass("customize-loading");this.iframe=c("