bug 32183: remove the client-* classes added from user-agent-sniffing onto the <html...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 3 Nov 2011 19:18:49 +0000 (19:18 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 3 Nov 2011 19:18:49 +0000 (19:18 +0000)
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.)

resources/mediawiki.page/mediawiki.page.startup.js

index c601c29..6217070 100644 (file)
@@ -3,15 +3,10 @@
        mw.page = {};
 
        /* Client profile classes for <html> */
+       /* Allows for easy hiding/showing of JS or no-JS-specific UI elements */
 
-       var prof = $.client.profile();
        $( 'html' )
-               .addClass(
-                       'client-' + prof.name
-                       + ' client-' + prof.name + '-' + prof.versionBase
-                       + ' client-' + prof.layout
-                       + ' client-' + prof.platform
-                       + ' client-js' )
+               .addClass('client-js' )
                .removeClass( 'client-nojs' );
 
 } )( jQuery );