MediaWiki:Common.js

来自Limbo Wiki
Sam0324讨论 | 贡献2022年3月27日 (日) 14:51的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
$(document).ready(function(){
	$("span.mw-summary-preset span.mw-summary-preset-item").click(function(){
		$(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").val($(this).children().text());
	});
	$("span.lw-treebut").click(function(){
    	$("div.lw-treediv").css("display","none");
    	$("span.lw-treediv").css("display","none");
    	attr = $(this).attr("id");
    	$("div." + attr).css("display","block");
    	$("span." + attr).css("display","inline");
	});
});