跳转到内容

User:SolidBlock/common.js

维基百科,自由的百科全书
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
/** ( function($,mw) {
	function expandAll($content) {
		var $Tables = $content.find('table.collapsible');
		console.log('$Tables:',$Tables);
		$Tables.each(function (i,table) {
			var $table = $(table);
			var $Button = $table.find('.collapseButton>a');
			if (!$Button[0]) return false;
console.log($table, $Button);
			if ($Button[0].firstChild.data = wgULS('显示', '顯示')) $Button.click();
		});
	}
	mw.hook('wikipage.content').add(expandAll);
})(jQuery, mw); **/

mw.loader.load("/w/index.php?title=User:SolidBlock/edittools.js&action=raw&ctype=text/javascript");
// 参见 [[User:SolidBlock/edittools.js]]