Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 22:10, 7 November 2009
485 bytes removed
,
22:10, 7 November 2009
delete redundant element class test section
Line 181:
Line 181:
addOnloadHook( createCollapseButtons );
addOnloadHook( createCollapseButtons );
−
/** Test if an element has a certain class **************************************
−
*
−
* Description: Uses regular expressions and caching for better performance.
−
* Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
−
*/
−
−
var hasClass = (function() {
−
var reCache = {};
−
return function( element, className ) {
−
return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
−
};
−
})();
/** Dynamic Navigation Bars (experimental) *************************************
/** Dynamic Navigation Bars (experimental) *************************************
FGrose
Bureaucrats
,
Check users
,
Administrators
,
Widget editors
8,288
edits