MediaWiki:Common.js:修订间差异
来自Limbo Wiki
(修复bug?) |
无编辑摘要 |
||
(未显示2个用户的30个中间版本) | |||
第1行: | 第1行: | ||
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ | /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ | ||
$( | $(document).ready(function(){ | ||
$("span.mw-summary-preset span.mw-summary-preset-item").click(function(){ | |||
$(" | a = $(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").get(0); | ||
a.value += $(this).children().text(); | |||
}); | |||
$(".lw-treebut").click(function(){ | |||
p = $(this).parents(".mw-parser-output").first(); | |||
p.find(".lw-treediv").css("display","none"); | |||
p.find(".lw-treediv." + $(this).attr("id")).css("display","block"); | |||
}); | |||
}); | }); |
2022年9月24日 (六) 13:20的最新版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ $(document).ready(function(){ $("span.mw-summary-preset span.mw-summary-preset-item").click(function(){ a = $(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").get(0); a.value += $(this).children().text(); }); $(".lw-treebut").click(function(){ p = $(this).parents(".mw-parser-output").first(); p.find(".lw-treediv").css("display","none"); p.find(".lw-treediv." + $(this).attr("id")).css("display","block"); }); });