MediaWiki:Gadget-moveRV.js
Sau khi lưu trang này, hãy xóa bộ nhớ đệm của trình duyệt để những thay đổi hiện ra:
Chrome, Firefox, Internet Explorer, Opera: Ctrl+⇧ Shift+R
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from [[en:User:Animum/moveRV.js]] by [[User:Vinhtantran]].
// Author: Animum, DexHexer and Gracenotes. Localized by Vinhtantran
importScript('User:Trần Nguyễn Minh Huy/urlparameters.js');
importScript('User:Trần Nguyễn Minh Huy/formatresponse.js');
importScript('User:Trần Nguyễn Minh Huy/moveRV-movefunc.js');
function zeroPad(str) {
return ("0" + str).slice(-2);
}
var isSysop = /sysop/.test(mw.config.get('wgUserGroups'));
function doMoveRV() {
var domove = confirm("Tất cả tác vụ di chuyển liệt kê tại trang này sẽ bị lùi lại" + (isSysop ? ", và các trang cũ sẽ bị xóa" : "") + ".\n\nNhấn \"OK\" để tiếp tục hoặc \"Hủy bỏ\" để hủy.");
if(domove) {
revertmoves(); //Function contained in moveRV-movefunc.js
} else {
return;
}
}
$.when($.ready,mw.loader.using('mediawiki.util')).then(function() {
if(mw.config.get('wgNamespaceNumber') == -1 && mw.config.get('wgCanonicalSpecialPageName') == "Log" && (UrlParameters["type"] == "move" || location.href.substring(location.href.indexOf("title=") + 6).split("/")[1] == "move" || location.href.substring(location.href.indexOf("/wiki/") + 6).split("?")[0].split("/")[1] == "move") && (UrlParameters["user"] || location.href.substring(location.href.indexOf("user=") + 5))) {
mw.util.addPortletLink("p-cactions", "javascript:doMoveRV()", "lùi di chuyển", "ca-pagemove");
}
});