From 1b146857e379ee86543923966fac604009f0e11d Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Wed, 1 Apr 2015 01:48:29 -0700 Subject: [PATCH] OutputPage: Tiny tweak to jQuery.ready inline script Changing 'window.jQuery && jQuery.ready()' to 'if ( window.jQuery ) jQuery.ready()' means no ** is required (because we got rid of the ampersands). It's also more readable and more consistent with if(window.mw). Change-Id: I28262efb978c085e732b40f9dc5ddb1bda5c4376 --- includes/OutputPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index edeae0d139..1a4f5b7bf6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3106,7 +3106,7 @@ class OutputPage extends ContextSource { // This also enforces $.isReady to be true at which fixes the // mw.loader bug in Firefox with using document.write between // and the DOMContentReady event (bug 47457). - $html = Html::inlineScript( 'window.jQuery && jQuery.ready();' ); + $html = Html::inlineScript( 'if(window.jQuery)jQuery.ready();' ); if ( !$this->getConfig()->get( 'ResourceLoaderExperimentalAsyncLoading' ) ) { $html .= $this->getScriptsForBottomQueue( false ); -- 2.20.1