跳转到内容

User:Willy1018/Remove school song.js

维基百科,自由的百科全书
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
$.ajax('https://tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
	if( $.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {
		$.ajax('https://en.wikipedia.org/w/index.php?title=User:Ohconfucius/script/MOSNUM_utils.js&action=raw&ctype=text/javascript', { dataType:'script', cache:true }).then(function() {
			$(function() {
				var add = mw.util.addPortletLink;
				$( add('p-tb', '#', '移除校歌')).click(Remove_school_song);
			});
		});
	}
});
function MOSNUM_edit_summary() {
	setoptions(minor='false');
	setreason('移除校歌,參見[[WP:校歌]]及[[WP:NOTLYRICS|維基百科不是不經篩選的資訊收集處#歌詞庫]]', 'append');
	doaction('diff');
}

function Remove_school_song() {
	ohc_regex(/^==.?校.?歌.?==(.*[\f\n\r\t\v].*)+$[^=]/, "");
}

function Remove_school_song(e) {
	e.preventDefault();
	Remove_fact();
	MOSNUM_edit_summary();
}