MediaWiki:Gadget-moveRV.js
Chú ý: Sau khi lưu trang, có thể bạn sẽ phải xóa bộ nhớ đệm của trình duyệt để xem các thay đổi.
- Firefox / Safari: Nhấn giữ phím Shift trong khi nhấn Tải lại (Reload), hoặc nhấn tổ hợp Ctrl-F5 hay Ctrl-R (⌘R trên Mac)
- Google Chrome: Nhấn tổ hợp Ctrl-Shift-R (⇧⌘R trên Mac)
- Internet Explorer / Edge: Nhấn giữ phím Ctrl trong khi nhấn Làm tươi (Refresh), hoặc nhấn tổ hợp Ctrl-F5
- Opera: Nhấn tổ hợp Ctrl-F5.
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from [[w: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;
}
}
$(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", "#", "lùi di chuyển", "ca-pagemove").click(function (evt) {
evt.preventDefault();
doMoveRV();
});
}
});