MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 21: | Line 21: | ||
/* For Favicon */ | /* For Favicon */ | ||
document.write("<link rel='shortcut icon' href='https://linguifex.com/assets/Linguifex4v1.png' type='image/ | document.write("<link rel='shortcut icon' href='https://linguifex.com/assets/Linguifex4v1.png' type='image/png'>"); | ||
Revision as of 15:43, 7 July 2025
// Gadgets
//syntax highlighter
mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript');
/** 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 );
};
})();
/* For Favicon */
document.write("<link rel='shortcut icon' href='https://linguifex.com/assets/Linguifex4v1.png' type='image/png'>");