r88146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88145‎ | r88146 | r88147 >
Date:10:41, 15 May 2011
Author:erik
Status:resolved (Comments)
Tags:
Comment:
Suppress article feedback tool on redirects. (Bug reported on English
Wikipedia Village Pump).
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -310,6 +310,9 @@
311311 }
312312 };
313313
 314+// Do not show if we're viewing a redirect
 315+if(mw.util.getParamValue('redirect')=='no') return false;
 316+
314317 /* Load at the bottom of the article */
315318 var $aftDiv = $( '<div id="mw-articlefeedback"></div>' ).articleFeedback( config );
316319

Follow-up revisions

RevisionCommit summaryAuthorDate
r88151Move to startup per r88146 code review commenterik11:01, 15 May 2011
r893551.17wmf1: MFT r88146, r88151, r89198, r89274catrope18:54, 2 June 2011

Comments

#Comment by Krinkle (talk | contribs)   10:45, 15 May 2011

At this point ArticleFeedback is already fully loaded and about to be initialized. These kind of checks should be in the startup module so that it won't download articlefeedback (and all the dependancies) at all.

Status & tagging log