X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/874d2a2f468a0d1e69aab49b1fe2d9d79d3e1142..refs/tags/wordpress-4.1:/wp-includes/js/customize-loader.js diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js index 2ee0c0f9..07f21966 100644 --- a/wp-includes/js/customize-loader.js +++ b/wp-includes/js/customize-loader.js @@ -14,9 +14,9 @@ window.wp = window.wp || {}; * Allows the Customizer to be overlayed on any page. * * By default, any element in the body with the load-customize class will open - * the Customizer overlay with the URL specified. + * an iframe overlay with the URL specified. * - * e.g. Open customizer + * e.g. Open Customizer * * @augments wp.customize.Events */ @@ -45,7 +45,7 @@ window.wp = window.wp || {}; $('#wpbody').on( 'click', '.load-customize', function( event ) { event.preventDefault(); - // Store a reference to the link that opened the customizer. + // Store a reference to the link that opened the Customizer. Loader.link = $(this); // Load the theme. Loader.open( Loader.link.attr('href') ); @@ -78,7 +78,7 @@ window.wp = window.wp || {}; Loader.open( Loader.settings.url + '?' + hash ); } - if ( ! hash && ! $.support.history ){ + if ( ! hash && ! $.support.history ) { Loader.close(); } }, @@ -90,7 +90,7 @@ window.wp = window.wp || {}; }, /** - * Open the customizer overlay for a specific URL. + * Open the Customizer overlay for a specific URL. * * @param string src URL to load in the Customizer. */ @@ -105,10 +105,13 @@ window.wp = window.wp || {}; return window.location = src; } + // Store the document title prior to opening the Live Preview + this.originalDocumentTitle = document.title; + this.active = true; this.body.addClass('customize-loading'); - // Dirty state of customizer in iframe + // Dirty state of Customizer in iframe this.saved = new api.Value( true ); this.iframe = $( '