“帮助:沙盒”的版本间的差异

来自个人维基
跳转至: 导航搜索
customized edit toolbar
recentchanges
 
(未显示1个用户的9个中间版本)
第7行: 第7行:
 
}}
 
}}
  
== Animated {{tl|Hidebox}}? ==
+
== Cite ==
  
{{MywikiParaHack|<html><details class="lnnblog-box </html><html>" </html><html>>
+
colcount=3 Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}} Aaaaa{{ref|11111}}
<summary class="lnnblog-box-heading" role=button </html><html>></html>hidebox<html></summary></html>}}
+
<div class="lnnblog-box-body">
+
一二三四五,上山打老虎。
+
</div>
+
{{MywikiParaHack|<html></details></html>}}
+
  
{{MywikiParaHack|<html><style>
+
{{reflist|colcount=3}}
.lnnblog-box {
+
  max-width: 100%;
+
}
+
.lnnblog-box[data-lnnblog-hidebox-state="expand"] {
+
  overflow: hidden;
+
}
+
.lnnblog-box-heading {
+
  list-style: none;
+
  position: relative;
+
  padding-left: 1.2rem;
+
}
+
.lnnblog-box-heading::-webkit-details-marker { display: none }
+
.lnnblog-box-heading::before {
+
  content: '';
+
  position: absolute;
+
  top: 0;
+
  bottom: 0;
+
  left: 0.4rem;
+
  margin: auto;
+
  height: 0;
+
  border: 0.3rem solid transparent;
+
  border-left-width: 0.5rem;
+
  border-left-color: currentColor;
+
  transform: rotate(0deg);
+
  transform-origin: 0.25rem 50%;
+
}
+
.lnnblog-box[open] > .lnnblog-box-heading::before {
+
  transform: rotate(90deg);
+
}
+
.lnnblog-box[data-lnnblog-hidebox-state="expand"] > .lnnblog-box-heading::before {
+
  animation: expand 250ms;
+
}
+
.lnnblog-box[data-lnnblog-hidebox-state="shrink"] > .lnnblog-box-heading::before {
+
  transform: rotate(0);
+
  animation: shrink 250ms;
+
}
+
@keyframes expand {
+
  from { transform: rotate(0deg); }
+
  to { transform: rotate(90deg); }
+
}
+
@keyframes shrink {
+
  from { transform: rotate(90deg); }
+
  to { transform: rotate(0deg); }
+
}
+
</style><script>
+
var animationDuration = 250
+
  
$( ".lnnblog-box-heading" ).on( "click", function ( event ) {
+
colwidth=18rem Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}} Aaaaa{{note|11111}}
  var $this = $( this )
+
  var $parent = $this.parent()
+
  var $body = $this.nextAll( ".lnnblog-box-body" )
+
  
  var open = $parent.prop( "open" )
+
{{notelist|colwidth=18rem}}
  var state = $parent.attr( "data-lnnblog-hidebox-state" )
+
  
  if ( !open || state === "shrink" ) {
+
== Img ==
    event.preventDefault()
+
    var currentWidth = $parent.width()
+
    var currentHeight = $parent.height()
+
    $parent.stop( true, true ).prop( "open", true )
+
    var targetWidth = $parent.width()
+
    var targetHeight = $parent.height()
+
  
    $body.outerWidth( targetWidth + 1 )
+
<pre>
    $this.addClass( "lnnblog-hidebox-heading-open" )
+
{{img|https://cdn.staticaly.com/gh/DGCK81LNN/dgck81lnn.github.io_old/13df0ab352ba990e2cb7e6ffff4ab7b9b44aaf85/site_icon.png}}
    $parent
+
</pre>
      .attr( "data-lnnblog-hidebox-state", "expand" )
+
{{img|https://cdn.staticaly.com/gh/DGCK81LNN/dgck81lnn.github.io_old/13df0ab352ba990e2cb7e6ffff4ab7b9b44aaf85/site_icon.png}}
      .width( currentWidth )
+
      .height( currentHeight )
+
    $parent.animate( {
+
        width: targetWidth,
+
        height: targetHeight
+
      }, {
+
        duration: animationDuration,
+
        done: function () {
+
          $body.css( "width", "" )
+
          $parent
+
            .css( {
+
              width: "",
+
              height: ""
+
            } )
+
            .removeAttr( "data-lnnblog-hidebox-state" )
+
        }
+
      } )
+
  } else if ( open || state === "expand" ) {
+
    event.preventDefault()
+
    var currentWidth = $parent.width()
+
    var currentHeight = $parent.height()
+
    $parent.stop( true, true ).prop( "open", false )
+
    var targetWidth = $parent.width()
+
    var targetHeight = $parent.height()
+
  
    state === "expand" || $body.outerWidth( currentWidth + 1 )
+
== recentchanges ==
    $this.removeClass( "lnnblog-hidebox-heading-open" )
+
    $parent
+
      .attr( "data-lnnblog-hidebox-state", "shrink" )
+
      .width( currentWidth )
+
      .height( currentHeight )
+
      .prop( "open", true )
+
      .animate( {
+
        width: targetWidth,
+
        height: targetHeight
+
      }, {
+
        duration: animationDuration,
+
        done: function () {
+
          $body.css( "width", "" )
+
          $parent
+
            .css( {
+
              width: "",
+
              height: ""
+
            } )
+
            .prop( "open", false )
+
            .removeAttr( "data-lnnblog-hidebox-state" )
+
        }
+
      } )
+
  }
+
  //return false
+
})
+
</script></html>}}
+
  
== customized edit toolbar ==
+
{{MywikiParaHack|<html>
 +
<table class="wikitable lnnblog-helper-recentchanges"><tr><td>Ajax加载...</td></tr></table>
 +
<script>
 +
$(window).on( "load", function () {
  
<html><style>
+
function getTimeDesc( ts ) {
#lnnblog-edittoolbar {
+
var date = new Date( ts )
font-size: 0.75rem;
+
var delta = Date.now() - date
background: #f9f9f9;
+
if ( delta >= 0 ) {
border: 1px solid #aaa;
+
if ( delta < 6e+4 ) return "刚刚"
padding: 2px;
+
if ( delta < 3.6e+6 ) return ( 0 | (delta / 6e+4 ) ) + " 分钟前"
margin-bottom: 2px;
+
if ( delta < 8.64e+7 ) return ( 0 | (delta / 3.6e+6 ) ) + " 小时前"
border-radius: 3px;
+
}
 +
// 手动 UTC+8(
 +
return new Date( date.valueOf() + 2.88e+7 ).toISOString().slice( 0, 10 )
 
}
 
}
#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 () {
 
  
/* 重新定义编辑工具栏 */
+
new mw.Api()
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
+
.get( {
  var $newToolbar = $( '<div id="lnnblog-edittoolbar" lang="zh-cmn-Hans">' )
+
action: "query",
  var $group = null
+
list: "recentchanges",
 +
rctype: "new|edit|log",
 +
rcnamespace: "0|4|6|10|14",
 +
rclimit: 200,
 +
rcprop: "title|timestamp|loginfo|redirect"
 +
} )
 +
.done( function ( data ) {
 +
var container = $( ".lnnblog-helper-recentchanges" )
  
  function addButton( label, title, before, after, sample ) {
+
try {
    $group.append( $( "<button>" )
+
if ( !data ) throw "请求失败"
      .attr( "type", "button" )
+
      .attr( "class", "lnnblog-button-small" )
+
      .attr( "title", title )
+
      .append( $( "<tt>" ).text( label ) )
+
      .on( "mousedown", false ) // 防止焦点离开文本框
+
      .click( mw.toolbar.insertTags.bind(mw.toolbar, before, after || "", sample || "") ) )
+
  }
+
  function newGroup() {
+
    $group = $( '<div>' ).appendTo( $newToolbar )
+
  }
+
  
  newGroup()
+
var rc = data.query.recentchanges
  addButton( "le",      "英文文本",          "{{le|", "}}" )
+
if ( !rc.length ) {
  addButton( "lj",      "逻辑语文本",        "{{lj|", "}}" )
+
container.text( "咕咕咕,最近没有更改记录" )
  addButton( "lang",    "文本语言",          "{{lang|und|", "}}" )
+
return
  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 )
+
container.html( "" )
}
+
var map = {}
 +
 
 +
for ( var i = 0; i < rc.length; ++i ) {
 +
var title = rc[ i ].title
 +
if ( rc[ i ].type === "log" ) {
 +
if ( rc[ i ].logtype !== "move" ) continue
 +
map[ title ] = true
 +
title = rc[ i ].move.new_title
 +
}
 +
if ( map.hasOwnProperty( title ) ) continue
 +
map[ title ] = true
 +
 
 +
if ( rc[ i ].type !== "log" )
 +
if ( "redirect" in rc[ i ] ) continue
 +
 
 +
var ts = rc[ i ].timestamp
  
 +
var li = $( "<tr><td data-1></td><td data-2></td></li>" )
 +
$( "td[data-1]", li ).text( title )
 +
$( "td[data-2]", li ).text( getTimeDesc( ts ) )
 +
container.append( li )
 +
}
 +
} catch (e) {
 +
container.text( "加载失败:" + e )
 +
throw e
 +
}
 +
} )
 
} )
 
} )
</script></html>
+
</script>
 +
</html>}}

2023年3月16日 (四) 09:27的最后版本

目录

lnncrypt

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

Cite

colcount=3 Aaaaa[1] Aaaaa[2] Aaaaa[3] Aaaaa[4] Aaaaa[5] Aaaaa[6] Aaaaa[7] Aaaaa[8] Aaaaa[9] Aaaaa[10] Aaaaa[11] Aaaaa[12] Aaaaa[13] Aaaaa[14] Aaaaa[15] Aaaaa[16] Aaaaa[17] Aaaaa[18] Aaaaa[19] Aaaaa[20] Aaaaa[21] Aaaaa[22] Aaaaa[23] Aaaaa[24] Aaaaa[25] Aaaaa[26] Aaaaa[27] Aaaaa[28] Aaaaa[29] Aaaaa[30] Aaaaa[31] Aaaaa[32]

  1. 11111
  2. 11111
  3. 11111
  4. 11111
  5. 11111
  6. 11111
  7. 11111
  8. 11111
  9. 11111
  10. 11111
  11. 11111
  12. 11111
  13. 11111
  14. 11111
  15. 11111
  16. 11111
  17. 11111
  18. 11111
  19. 11111
  20. 11111
  21. 11111
  22. 11111
  23. 11111
  24. 11111
  25. 11111
  26. 11111
  27. 11111
  28. 11111
  29. 11111
  30. 11111
  31. 11111
  32. 11111

colwidth=18rem Aaaaa[注 1] Aaaaa[注 2] Aaaaa[注 3] Aaaaa[注 4] Aaaaa[注 5] Aaaaa[注 6] Aaaaa[注 7] Aaaaa[注 8] Aaaaa[注 9] Aaaaa[注 10] Aaaaa[注 11] Aaaaa[注 12] Aaaaa[注 13] Aaaaa[注 14] Aaaaa[注 15] Aaaaa[注 16] Aaaaa[注 17] Aaaaa[注 18] Aaaaa[注 19] Aaaaa[注 20] Aaaaa[注 21] Aaaaa[注 22] Aaaaa[注 23] Aaaaa[注 24] Aaaaa[注 25] Aaaaa[注 26] Aaaaa[注 27] Aaaaa[注 28] Aaaaa[注 29] Aaaaa[注 30] Aaaaa[注 31]

  1. 11111
  2. 11111
  3. 11111
  4. 11111
  5. 11111
  6. 11111
  7. 11111
  8. 11111
  9. 11111
  10. 11111
  11. 11111
  12. 11111
  13. 11111
  14. 11111
  15. 11111
  16. 11111
  17. 11111
  18. 11111
  19. 11111
  20. 11111
  21. 11111
  22. 11111
  23. 11111
  24. 11111
  25. 11111
  26. 11111
  27. 11111
  28. 11111
  29. 11111
  30. 11111
  31. 11111

Img

{{img|https://cdn.staticaly.com/gh/DGCK81LNN/dgck81lnn.github.io_old/13df0ab352ba990e2cb7e6ffff4ab7b9b44aaf85/site_icon.png}}

recentchanges

Ajax加载...