查看“︁MediaWiki:Common.js”︁的源代码
外观
因为以下原因,您没有权限编辑该页面:
您可以查看和复制此页面的源代码。
/*
* This is the JS for all skins (for both mobile and desktop) on MediaWiki.org.
* Consider whether you can use a gadget with one of the options set to limit
* where it is loaded. See [[Extension:Gadgets#Options]].
*/
/* global mw, $ */
/**
* Hide prefix in category
*
* @source https://www.mediawiki.org/wiki/Snippets/Hide_prefix_in_category
* @rev 5
*/
var prefix = $.trim( $( '#mw-cat-hideprefix' ).text() ) || ( mw.config.get( 'wgTitle' ) + '/' );
$( '#mw-pages' ).find( 'a' ).text( function ( i, val ) {
return val.slice( 0, prefix.length ) === prefix ? val.slice( prefix.length ) : val;
} );
/**
* @source https://www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL
* @revision 2017-05-16
*/
mw.loader.using( ['mediawiki.util'], function () {
000
1:0