MediaWiki:Common.js:修订间差异

来自Limbo Wiki
(爱来自萨牟.jpg)
无编辑摘要
 
第2行: 第2行:
$(document).ready(function(){
$(document).ready(function(){
  $("span.mw-summary-preset span.mw-summary-preset-item").click(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());
   a = $(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").get(0);
  a.value += $(this).children().text();
  });
  });
  $(".lw-treebut").click(function(){
  $(".lw-treebut").click(function(){

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");
 });
});