User:AzusaNyan/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:AzusaNyan/common.css. |
importScript('User:BrandonXLF/Restorer.js'); // [[User:BrandonXLF/Restorer.js]]
importScript('User:BrandonXLF/QuickEdit.js'); // [[User:BrandonXLF/QuickEdit.js]]
/**
* This is a collection of tools, scripts and small UI modications I find helpful in patrolling and fighting vandalism.
* @source meta.wikimedia.org/wiki/User:Krinkle/Scripts/Countervandalism.js
* @track [[File:Krinkle_Countervandalism.js]]
*/
(function () {
// [[File:Krinkle_RTRC.js]]
mw.loader.getState('ext.gadget.rtrc') ? mw.loader.load('ext.gadget.rtrc') : mw.loader.load('https://www.mediawiki.org/w/load.php?debug=false&modules=ext.gadget.rtrc&lang=' + mw.config.get('wgUserLanguage', 'en'));
// [[File:Krinkle_WhatLeavesHere.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Tools/WhatLeavesHere.js&action=raw&ctype=text/javascript');
// [[File:Krinkle_CVNSimpleOverlay_wiki.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/CVNSimpleOverlay_wiki.js&action=raw&ctype=text/javascript');
mw.loader.using(['mediawiki.util', 'mediawiki.user'], function () {
$(function () {
// Clone .mw-contributions-footer to the top aswell
if (mw.config.get('wgCanonicalSpecialPageName') === 'Contributions' && $('.mw-contributions-footer').length) {
$('#contentSub').after($('.mw-contributions-footer').eq(0).clone());
}
// Extra links
mw.util.addPortletLink('p-tb', mw.util.getUrl('Special:Prefixindex/' + mw.config.get('wgPageName')), 'Prefixindex', 'tb-prefixindex');
});
});
/* Vector only */
if (mw.config.get('skin') === 'vector') {
/**
* Add "Purge" content action link.
*
* Dependencies: mediawiki.util, mediawiki.api
*
* @source https://www.mediawiki.org/wiki/Snippets/Purge_action
* @revision 2016-05-17
*/
$.when(mw.loader.using(['mediawiki.util', 'mediawiki.api']), $.ready).then(function () {
if ($('#ca-purge').length) return;
var node = mw.util.addPortletLink( 'p-cactions',
mw.util.getUrl(null, { action: 'purge' }),
'Purge',
'ca-purge',
'Purge the server cache of this page'
);
$(node).on('click', function (e) {
var tag = 'snippet-purge-' + (++$.guid);
mw.notify('Purging...', { tag: tag });
new mw.Api().post({ action: 'purge', titles: mw.config.get('wgPageName'), forcelinkupdate: '1' }).then(function () {
mw.notify('Purge completed.', { tag: tag });
location.reload();
}, function () {
mw.notify('Purge failed.', { type: 'error', tag: tag });
});
e.preventDefault();
});
});
}
}());
//<nowiki>
/* Cat-a-lot - changes category of multiple files */
mw.loader.using(['jquery.ui', 'mediawiki.util'], function(){
mw.loader.load('//commons.wikimedia.org/w/load.php?modules=ext.gadget.Cat-a-lot');
});
////////// Cat-a-lot user preferences //////////
window.catALotPrefs = {"watchlist":"preferences","minor":true,"editpages":true,"docleanup":false,"subcatcount":10};
////////////////////////////////////catALotEnd//
//</nowiki>
// [[File:Krinkle_RTRC.js]]
(mw.loader.getState('ext.gadget.rtrc') ? mw.loader.load('ext.gadget.rtrc') : mw.loader.load('https://www.mediawiki.org/w/load.php?modules=ext.gadget.rtrc&lang=' + mw.config.get('wgUserLanguage', 'vi')));