打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

帮助:沙盒:修订间差异

来自 LNN的:not(博客)?
DGCK81LNN留言 | 贡献
无编辑摘要
DGCK81LNN留言 | 贡献
第139行: 第139行:
== customized edit toolbar ==
== customized edit toolbar ==


<html><script>
<html><style>
#lnnblog-edittoolbar {
font-size: 0.75rem;
}
#lnnblog-edittoolbar div {
display: inline-block;
    margin-right: 0.25rem;
}
#lnnblog-edittoolbar button {
margin-right: 1px;
font-size: inherit;
line-height: 1.25;
}
</style><script>
$( function () {
$( function () {
var newToolbar = $( '<div id="lnnblog-edittoolbar">' )
 
$( "#ydnedittoolbar" ).replaceWith(newToolbar)
/* 重新定义编辑工具栏 */
function addButton(label, before, after, sample) {
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
  newToolbar.append( $( "<button>" ).text( label ).click( mw.toolbar.insertTags.bind(mw.toolbar, before, after, sample) ) )
  var $newToolbar = $( '<div id="lnnblog-edittoolbar" lang="zh-cmn-Hans">' )
}bbbdddccc
  var $group = null
addButton("aaa", "bbb", "ccc", "ddd")
 
/*
  function addButton( label, title, before, after, sample ) {
mw.loader.using("mediawiki.action.edit", function() {
    $group.append( $( "<button>" )
//debugger
      .attr( "type", "button" )
//mw.toolbar.addButton("/skins/common/images/", "", "", "", "", "", "separator", "");
      .attr( "class", "lnnblog-button-small" )
mw.toolbar.addButton("/skins/common/images/button_link.png", "内部链接", "[[", "]]", "链接文字", "mw-editbutton-lnnblog-link", "mw", "false");
      .attr( "title", title )
mw.toolbar.addButton("", "内部链接", "[[", "]]", "链接文字", "mw-editbutton-lnnblog-link2", "mw", "false");
      .append( $( "<tt>" ).text( label ) )
mw.toolbar.addButton("/skins/common/images/button_category.png", "添加分类", "[[category:", "]]", "分类", "mw-editbutton-lnnblog-cat", "mw", "false");
      .on( "mousedown", false ) // 防止焦点离开文本框
mw.toolbar.addButton("/skins/common/images/button_redirect.png", "重定向页面(需放在页面顶端)", "#REDIRECT[[", "]]", "目标页面", "mw-editbutton-lnnblog-redir", "mw", "false");
      .click( mw.toolbar.insertTags.bind(mw.toolbar, before, after || "", sample || "") ) )
} )*/
  }
  function newGroup() {
    $group = $( '<div>' ).appendTo( $newToolbar )
  }
 
  newGroup()
  addButton( "le",      "英文文本",          "{{le|", "}}" )
  addButton( "lj",      "逻辑语文本",        "{{lj|", "}}" )
  addButton( "lang",    "文本语言",          "{{lang|und|", "}}" )
  newGroup()
  addButton( "[[]]",    "内链",              "[[", "]]" )
  addButton( "lelink",  "英文内链",          "{{lelink|", "}}" )
  addButton( "ljlink",  "逻辑语内链",        "{{lelink|", "}}" )
  addButton( "{{|}}",  "模板调用",          "{{|", "}}" )
  newGroup()
  addButton( "h2",     "二级标题",           "== ", " ==" )
  addButton( "h3",      "三级标题",          "=== ", " ===" )
  newGroup()
  addButton( "table",  "wikitable 表格",    "{|class=wikitable\n! ", "\n|-\n|\n|}" )
  addButton( "box",    "box 模板",          "{{box|标题|2=\n", "\n}}" )
  addButton( "hidebox", "hidebox 模板",      "{{hidebox|标题|2=\n", "\n}}" )
  newGroup()
  addButton( "nw",      "nowiki 标签",        "<nowiki>", "</nowiki>" )
  addButton( "nw/",    "空 nowiki 标签",    "<nowiki/>" )
  addButton( "code",    "行内代码",          "{{code|", "}}" )
  addButton( "codenw", "nowiki 代码",       "{{code|<nowiki>", "</nowiki>}}" )
  addButton( "pre",     "pre 块",             "<pre>\n", "\n</pre>" )
  addButton( "syntax",  "代码高亮块",        "<syntaxhighlight lang=javascript>\n", "\n</syntaxhighlight>" )
  newGroup()
  addButton( "html",    "原始 HTML 标签",    "<html>", "<\/html>" )
  addButton( "/html",   "反向原始 HTML 标签", "<\/html>", "<html>" )
  addButton( "phack",   "原始 HTML 块",       "{{MywikiParaHack|<html>", "<\/html>}}" )
  newGroup()
  addButton( "subst",   "模板替代",           "{{subst:", "}}" )
  addButton( "pn",     "当前页面名称",       mw.config.get( 'wgTitle' ) )
  addButton( "bpn",     "粗体的当前页面名称", "'''" + mw.config.get( 'wgTitle' ) + "'''" )
  addButton( "fpn",    "带名字空间的当前页面名称", mw.config.get( 'wgPageName' ) )
  newGroup()
  addButton( "Cat",     "分类",               "[[分类:", "]]" )
  addButton( "SORT",   "默认排序字",        "{{DEFAULTSORT:", "}}", mw.config.get( "wgTitle" ) )
  newGroup()
  addButton( "<!--",    "HTML 注释",          "<!--", "-->" )
  addButton( "ni",     "noinclude 标签",    "<noinclude>", "</noinclude>" )
  addButton( "ni/",    "空 noinclude 标签",  "<noinclude/>", "" )
  addButton( "io",     "includeonly 标签",   "<includeonly>", "</includeonly>" )
  addButton( "oi",     "onlyinclude 标签",   "<onlyinclude>", "</onlyinclude>" )
 
  $( "#ydnedittoolbar" ).parent().replaceWith( $newToolbar )
}
 
} )
} )
</script></html>
</script></html>

2022年11月24日 (四) 14:14的版本


lnncrypt

              .    .   ,       ,​“”!!(

Animated {{Hidebox}}?

hidebox

一二三四五,上山打老虎。

customized edit toolbar