User:Uw3088/global.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
importScript("User:A930913/vada/import.js"); //[[User:A930913/vada/import.js]]
mw.hook( 'wikipage.content' ).add( function() {
$( '.thumbinner' ).not( '.mp-thumb' ).each( function() {
$( this ).css( 'width', ( parseInt( $( this ).css( 'width' ) ) - 2 ) + 'px' );
} );
} );
/* Change language to Portuguese of Brazil*/
mw.loader.using( 'mediawiki.user', function() {
if ( mw.user.options.get( 'language' ) !== 'pt-br' ) {
( new mw.Api() ).postWithToken( 'csrf', {
action: 'options',
change: 'language=pt-br'
} ).done( function() {
mw.loader.using( [], function() {
mw.notify( 'O idioma foi alterado para o português do Brasil. Atualize a página por favor!' );
} );
} );
} else {
console.log( 'Idioma já definido para o Português!' );
}
} );
mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:MoreMenu.import.js');
// [[File:Krinkle_RTRC.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript' );
mw.loader.load('//fr.wikipedia.org/w/index.php?title=Mediawiki:Gadget-HotCatsMulti.js&action=raw&ctype=text/javascript');
/* Live RC */
window.LiveRC_getSiteCustom = function (){
// Here comes the configuration
}
mw.loader.load( '//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&action=raw&ctype=text/javascript' );
/* ************************************************** */
//syntax highlighter
mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript');
// [[Wikipedia:Tools/Navigation popups]]
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css');
/**
* Vector HeadAnchors
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-vector-headanchor.js
* @revision 2015-03-07
*
* @license http://krinkle.mit-license.org/
* @author Timo Tijhof, 2013–2015
*/
( function ( $ ) {
$( '.mw-headline' ).each( function ( i, el ) {
var id = el.id,
$headline = $( el ),
$header = $headline.parent();
// If MediaWiki core's anchor is here, or if ours is here already, skip.
if ( !id || $header.find( '.mw-headline-anchor,.mw-headline-headanchor').length ) {
return;
}
$headline.removeAttr('id')
$header.addClass( 'mw-header' ).prepend(
$( '<a>' ).prop({
id: id,
href: '#' + id,
title: 'Link to this section',
className: 'mw-headline-headanchor'
})
);
} );
}( jQuery ) );
mw.loader.load('//www.mediawiki.org/w/index.php?title=XTools/ArticleInfo.js&action=raw&ctype=text/javascript');