“用户:星海子/common.js”的版本间的差异

来自萌娘文库
跳转至: 导航搜索
(同步界面消息)
1个标签Bot
 
第1行: 第1行:
 
//InPageEdit
 
//InPageEdit
mw.loader.load('https://cdn.jsdelivr.net/npm/mediawiki-inpageedit');
+
mw.loader.load('https://fastly.jsdelivr.net/npm/mediawiki-inpageedit');
 
window.InPageEdit = window.InPageEdit || {};
 
window.InPageEdit = window.InPageEdit || {};
 
InPageEdit.myPreference = {
 
InPageEdit.myPreference = {
第30行: 第30行:
 
}
 
}
 
if ( mw.config.get("wgNamespaceNumber") === 14 ){
 
if ( mw.config.get("wgNamespaceNumber") === 14 ){
mw.loader.load('https://cdn.jsdelivr.net/gh/lovelyCARDINAL/moegirl/NEC.min.js'); //NullEditInCategory
+
mw.loader.load('https://fastly.jsdelivr.net/gh/lovelyCARDINAL/moegirl/NEC.min.js'); //NullEditInCategory
 
}
 
}
 
});
 
});
 
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:星海子/js/markblocked.js&action=raw&ctype=text/javascript');//封禁用户标识
 
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:星海子/js/markblocked.js&action=raw&ctype=text/javascript');//封禁用户标识
mw.loader.load('https://cdn.jsdelivr.net/gh/lovelyCARDINAL/moegirl/MR.min.js');//批量回退&撤销
+
mw.loader.load('https://fastly.jsdelivr.net/gh/lovelyCARDINAL/moegirl/MR.min.js');//批量回退&撤销
 
/* Hotcat */
 
/* Hotcat */
 
window.hotcat_use_category_links = false;
 
window.hotcat_use_category_links = false;

2022年5月20日 (五) 03:02的最新版本

//InPageEdit
mw.loader.load('https://fastly.jsdelivr.net/npm/mediawiki-inpageedit');
window.InPageEdit = window.InPageEdit || {};
InPageEdit.myPreference = {
	"outSideClose":true, "editMinor":true, "noConfirmEdit": true, "redLinkQuickEdit":false,
	"editSummary":"    $section$oldid // Edit Via InPageEdit", "watchList": "nochange",
	"plugins":["toolbox.js","edit-any-page.js","quick-thank.js","code-mirror/script.js","wiki-editor.js"],
	"codeMirrorTheme": (mw.config.get("wgNamespaceNumber")%2 == 0 && (mw.config.get("wgTitle").includes(".js") || mw.config.get("wgTitle").includes(".css") || mw.config.get("wgNamespaceNumber") === 274)) ? "solarized" : "juejin"
};
mw.hook("InPageEdit").add(function (ctx) {
	var InPageEdit = ctx.InPageEdit, _msg = ctx._msg, wgPageName = mw.config.get("wgRelevantPageName"), wgRevisionId = mw.config.get("wgRevisionId");
	$("#ca-edit").after(
		$("<li>", { id: "ca-quick-edit", "class": "collapsible"}).append(
			$("<span>").append( $("<a>", { href: "javascript:void(0)", text: _msg("quick-edit") })
			.on("click", function () { InPageEdit.quickEdit({ page: wgPageName, revision: wgRevisionId || undefined });
			})
			)
		)
	);
});
$.when( mw.loader.using( ['mediawiki.util'] ), $.ready )
.then( function () { 
	mw.util.addPortletLink("p-navigation","/index.php?title=Special:Newpages&hideredirs=0&namespace=all","所有新页面",null,null,null,"#n-sidebar-newfiles");
	mw.util.addPortletLink("p-navigation", "/Special:Contributions/机娘星海酱","机器人贡献",null,null,null,"#n-sidebar-newfiles");
	mw.util.addPortletLink("p-navigation", "/Special:Log/星海-adminbot","机器人日志",null,null,null,"#n-sidebar-newfiles");
	mw.util.addPortletLink("p-navigation", "/Special:AbuseFilter","AbuseFilter");
	$("#t-sidebar-delete a, #t-sidebar-expandtemplates a, #t-sidebar-changecontentmodel a").attr("target","_blank");
	if ( mw.config.get("wgNamespaceNumber") === 14 || mw.config.get("wgCanonicalSpecialPageName") === "Whatlinkshere" ){
		$( mw.util.addPortletLink("p-cactions", $("#ca-masseditregex a").attr('href') , "批量正则编辑", "ca-MassEditRegex", "批量正则编辑") ).attr("class","patroller-show"); //MassEditRegex
	}
	if ( mw.config.get("wgNamespaceNumber") === 14 ){
		mw.loader.load('https://fastly.jsdelivr.net/gh/lovelyCARDINAL/moegirl/NEC.min.js'); //NullEditInCategory
	}
});
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:星海子/js/markblocked.js&action=raw&ctype=text/javascript');//封禁用户标识
mw.loader.load('https://fastly.jsdelivr.net/gh/lovelyCARDINAL/moegirl/MR.min.js');//批量回退&撤销
/* Hotcat */
window.hotcat_use_category_links = false;
mw.loader.using("mediawiki.user", function () {
	$('body').delegate('#hotcatCommitForm', 'submit', function () {
		var submitType = this.wpDiff;
		if (submitType && (!this.oldid || this.oldid.value == '0')) {
			this.wpEditToken.value = mw.user.tokens.get("csrfToken");
			submitType.name = submitType.value = 'wpSave';
		}
		return true;
	});
});
/* Popups */
window.popupStructure = 'menus';
window.popupHideDelay = '0.1';
window.popupActionsMenu = false;
window.popupShortcutKeys = true;
window.popupImages = false;
window.popupFixRedirs = true;
window.popupRedirAutoClick = 'wpSave';
window.popupFixDabs = true;
window.popupDabsAutoClick = 'wpSave';
window.popupImageLinks = false;