r101860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101859‎ | r101860 | r101861 >
Date:19:18, 3 November 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
bug 32183: remove the client-* classes added from user-agent-sniffing onto the <html> element.

Browser sniffing is bad, and having these here encourages unpleasantness.
Keeping the js/nojs ones as those are useful and non-evil (they're an example of feature detection, exposed via CSS here rather than through JS.)
Modified paths:
  • /trunk/phase3/resources/mediawiki.page/mediawiki.page.startup.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.startup.js
@@ -3,15 +3,10 @@
44 mw.page = {};
55
66 /* Client profile classes for <html> */
 7+ /* Allows for easy hiding/showing of JS or no-JS-specific UI elements */
78
8 - var prof = $.client.profile();
99 $( 'html' )
10 - .addClass(
11 - 'client-' + prof.name
12 - + ' client-' + prof.name + '-' + prof.versionBase
13 - + ' client-' + prof.layout
14 - + ' client-' + prof.platform
15 - + ' client-js' )
 10+ .addClass('client-js' )
1611 .removeClass( 'client-nojs' );
1712
1813 } )( jQuery );

Sign-offs

UserFlagDate
Nikerabbitinspected11:11, 4 November 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r102534REL1_18 r101540, r101666, r101860, r101990reedy17:10, 9 November 2011
r1025981.18wmf1 MFT r101445, r101464, r101666, r101802, r101860, r101990, r102297, r...reedy23:20, 9 November 2011

Comments

#Comment by Platonides (talk | contribs)   22:14, 3 November 2011

Also kill it from 1.18? Doesn't seem to have been used in 1.17, so this way we wouldn't ship newly deprecated features.

#Comment by Brion VIBBER (talk | contribs)   22:20, 3 November 2011

Sounds wise; tagging.

#Comment by Nikerabbit (talk | contribs)   11:11, 4 November 2011

Inconsistent whitespace: nitpick.

#Comment by Hashar (talk | contribs)   10:42, 8 November 2011

bug 32183 marked for 1.18 tarball

Status & tagging log