User:Xiplus/common.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
/* 反importScript */
var whitelist = ["Xiplus", "A2093064-test", "A2093064-bot"];
if (mw.config.get('wgUserName') && whitelist.indexOf(mw.config.get('wgUserName')) === -1) {
alert("請勿importScript User:Xiplus/common.js!可能有未預期的危害發生。");
throw new Error();
}
//importScript('User:Xiplus/js/admin-backlog.js'); // Backlink: [[User:Xiplus/js/admin-backlog.js]]
importScript('User:Xiplus/js/AFD-stats.js'); // Backlink: [[User:Xiplus/js/AFD-stats.js]]
//importScript('User:Xiplus/js/AFDpagelog.js'); // Backlink: [[User:Xiplus/js/AFDpagelog.js]]
importScript('User:Xiplus/js/apply-edit-from-abuselog.js'); // Backlink: [[User:Xiplus/js/apply-edit-from-abuselog.js]]
importScript('User:Xiplus/js/bulletin-editor.js'); // Backlink: [[User:Xiplus/js/bulletin-editor.js]]
importScript('User:Xiplus/js/close-affp.js'); // Backlink: [[User:Xiplus/js/close-affp.js]]
importScript('User:Xiplus/js/close-move.js'); // Backlink: [[User:Xiplus/js/close-move.js]]
importScript('User:Xiplus/js/close-rfpp.js'); // Backlink: [[User:Xiplus/js/close-rfpp.js]]
importScript('User:Xiplus/js/close-rrd.js'); // Backlink: [[User:Xiplus/js/close-rrd.js]]
importScript('User:Xiplus/js/close-vip.js'); // Backlink: [[User:Xiplus/js/close-vip.js]]
importScript('User:Xiplus/js/csd-reason-in-csd-cat.js'); // Backlink: [[User:Xiplus/js/csd-reason-in-csd-cat.js]]
importScript('User:Xiplus/js/delete-status.js'); // Backlink: [[User:Xiplus/js/delete-status.js]]
importScript('User:Xiplus/js/disable-redirect.js'); // Backlink: [[User:Xiplus/js/disable-redirect.js]]
importScript('User:Xiplus/js/forceEditSection.js'); // Backlink: [[User:Xiplus/js/forceEditSection.js]]
importScript('User:Xiplus/js/hide-log-username.js'); // Backlink: [[User:Xiplus/js/hide-log-username.js]]
importScript('User:Xiplus/js/hide-long-summary.js'); // Backlink: [[User:Xiplus/js/hide-long-summary.js]]
importScript('User:Xiplus/js/highlight-newpages.js'); // Backlink: [[User:Xiplus/js/highlight-newpages.js]]
importScript('User:Xiplus/js/history-filter.js'); // Backlink: [[User:Xiplus/js/history-filter.js]]
importScript('User:Xiplus/js/HRTProtectLink.js'); // Backlink: [[User:Xiplus/js/HRTProtectLink.js]]
importScript('User:Xiplus/js/log-move-whatlinkshere.js'); // Backlink: [[User:Xiplus/js/log-move-whatlinkshere.js]]
importScript('User:Xiplus/js/mass-revision-delete.js'); // Backlink: [[User:Xiplus/js/mass-revision-delete.js]]
//importScript('User:Xiplus/js/mass-rollback.js'); // Backlink: [[User:Xiplus/js/mass-rollback.js]]
//importScript('User:Xiplus/js/PatrollCount.js'); // Backlink: [[User:Xiplus/js/PatrollCount.js]]
importScript('User:Xiplus/js/Page-Preview.js'); // Backlink: [[User:Xiplus/js/Page-Preview.js]]
importScript('User:Xiplus/js/report-filter.js'); // Backlink: [[User:Xiplus/js/report-filter.js]]
importScript('User:Xiplus/js/TranslateVariants.js'); // Backlink: [[User:Xiplus/js/TranslateVariants.js]]
importScript('User:Xiplus/js/TranslateTextVariants.js'); // Backlink: [[User:Xiplus/js/TranslateTextVariants.js]]
//importScript('User:Xiplus/js/Twinkle-delete-reason.js'); // Backlink: [[User:Xiplus/js/Twinkle-delete-reason.js]]
importScript('User:Xiplus/js/unblock-zh-ipbe.js'); // Backlink: [[User:Xiplus/js/unblock-zh-ipbe.js]]
importScript('User:Xiplus/js/userRightsManager.js'); // Backlink: [[User:Xiplus/js/userRightsManager.js]]
/* SpecialInterlanguageLink */
window.SpecialInterlanguageLink = {
"lang": {
"wikt": "詞典",
"q": "語錄",
"v": "學院",
"s": "文庫",
"b": "教科書",
"voy": "導遊",
"n": "新聞",
"m": "Meta",
"en": "English"
}
};
importScript('User:Xiplus/js/SpecialInterlanguageLink.js'); // Backlink: [[User:Xiplus/js/SpecialInterlanguageLink.js]]
importScript('User:Xiplus/js/get-list/Special-BlockList-Target.js'); // Backlink: [[User:Xiplus/js/get-list/Special-BlockList-Target.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/js/block-time-convert.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/js/quick-patrol.js&action=raw&ctype=text/javascript');
//mw.loader.load('https://xiplus.ddns.net/MediaWiki-Gadget/quick-patrol.js');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/js/watchlist-markseen.js&action=raw&ctype=text/javascript');
if (mw.util.getParamValue('edittag') !== null) {
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/js/editchangetags-link.js&action=raw&ctype=text/javascript');
}
/****************************************************************/
/** 注意!以下的js請勿使用 **/
/****************************************************************/
mw.loader.load('https://xiplus.ddns.net/MediaWiki-Gadget/Template-transclusion-count.js');
/****************************************************************/
/** 注意!以上的js請勿使用 **/
/****************************************************************/
/* 其他人的 */
importScript('User:WhitePhosphorus/js/all-in-one.js'); // Backlink: [[User:WhitePhosphorus/js/all-in-one.js]]
importScript('User:WhitePhosphorus/js/PagePatroller.js'); // Backlink: [[User:WhitePhosphorus/js/PagePatroller.js]]
importScript('User:WhitePhosphorus/js/rrd.js'); // Backlink: [[User:WhitePhosphorus/js/rrd.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript');
//mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:He7d3r/Tools/ScoredRevisions.js&action=raw&ctype=text/javascript');
/* 設定 */
window.LocalComments = {
twentyFourHours: true,
disablePages: function() {
if (mw.config.get('wgDiffOldId') !== null) {
return true;
}
return false;
}
};
/* TranslateTextVariants */
if (mw.config.get('wgAction') === 'edit') {
var link = mw.util.addPortletLink(
'p-tb',
'#',
'轉換文字'
);
$(link).on('click', function() {
var lang = prompt('lang', 'zh-cn');
if (lang) {
window.TranslateTextVariants($('#wpTextbox1').val(), lang).then(function(x) { $('#wpTextbox1').val(x) });
}
});
}
/* Checklinks */
mw.util.addPortletLink(
"p-tb",
"http://69.142.160.183/~dispenser/cgi-bin/webchecklinks.py?page=" + mw.config.get('wgContentLanguage') + ":" + encodeURIComponent(mw.config.get('wgPageName')),
"檢測連結",
't-checklinks',
'',
'',
$('#t-specialpages')
);
window.removehiddenchars = function() {
importScript('User:Vanished user 1929210/removehiddenchars.js'); // Backlink: [[User:Vanished user 1929210/removehiddenchars.js]]
mw.notify("已去除不可見字元");
}
mw.util.addPortletLink(
"p-tb",
"javascript:removehiddenchars()",
"去除不可見字元",
't-removehiddenchars',
'',
'',
$('#t-specialpages')
);
importScript('User:Xiplus/js/abuselog-links.js'); // Backlink: [[User:Xiplus/js/abuselog-links.js]]
mw.util.addPortletLink(
'p-tb',
'http://69.142.160.183/~dispenser/cgi-bin/dab_solver.py?page=zh:' + mw.config.get('wgPageName'),
'Dab solver',
't-dab-solver',
'',
'',
$('#t-specialpages')
);
importScript('User:Xiplus/js/afd-links.js'); // Backlink: [[User:Xiplus/js/afd-links.js]]
//importScript('User:Xiplus/js/hide-header.js'); // Backlink: [[User:Xiplus/js/hide-header.js]]
importScript('User:和平奮鬥救地球/DisamAssist.js'); // Backlink: [[User:和平奮鬥救地球/DisamAssist.js]]
importScript('User:Xiplus/js/hide-userrights-summary.js'); // Backlink: [[User:Xiplus/js/hide-userrights-summary.js]]
importScript('User:Xiplus/js/spihelper.js'); // Backlink: [[User:Xiplus/js/spihelper.js]]
importScript('User:Xiplus/js/categorymembers-add-time.js'); // Backlink: [[User:Xiplus/js/categorymembers-add-time.js]]
importScript('User:Xiplus/js/spi-to-twg-srcu.js'); // Backlink: [[User:Xiplus/js/spi-to-twg-srcu.js]]
importScript('User:Xiplus/js/unblock-zh-helper/load.js'); // Backlink: [[User:Xiplus/js/unblock-zh-helper/load.js]]
// Copied from [[MediaWiki:Gadget-variant-link-fix.js]]
try {
var ref, loc;
try {
ref = new mw.Uri( document.referrer );
} catch ( e ) {
ref = new mw.Uri( document.referrer + '/' );
}
loc = new mw.Uri( location.href );
if (/\.google\./.test(ref.host) && loc.host == 'zh.m.wikipedia.org') {
loc.host = 'zh.wikipedia.org';
loc.path = loc.path.replace(/^\/zh(-[^/]+)?\//, "/wiki/");
location.replace(loc.toString());
}
} catch ( e ) {
}
importScript('User:Xiplus/js/ar-helper.js'); // Backlink: [[User:Xiplus/js/ar-helper.js]]