From b2fa982253b01d170515a439f5f511e22f94826c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 3 Nov 2011 19:18:49 +0000 Subject: [PATCH] bug 32183: remove the client-* classes added from user-agent-sniffing onto the 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.) --- resources/mediawiki.page/mediawiki.page.startup.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/resources/mediawiki.page/mediawiki.page.startup.js b/resources/mediawiki.page/mediawiki.page.startup.js index c601c290f2..6217070a78 100644 --- a/resources/mediawiki.page/mediawiki.page.startup.js +++ b/resources/mediawiki.page/mediawiki.page.startup.js @@ -3,15 +3,10 @@ mw.page = {}; /* Client profile classes for */ + /* 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 ); -- 2.20.1