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

来自个人维基
跳转至: 导航搜索
recentchanges
 
(未显示1个用户的11个中间版本)
第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%;
+
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}}
}
+
 
.lnnblog-box[data-lnnblog-hidebox-state="expand"] {
+
{{notelist|colwidth=18rem}}
  overflow: hidden;
+
 
 +
== Img ==
 +
 
 +
<pre>
 +
{{img|https://cdn.staticaly.com/gh/DGCK81LNN/dgck81lnn.github.io_old/13df0ab352ba990e2cb7e6ffff4ab7b9b44aaf85/site_icon.png}}
 +
</pre>
 +
{{img|https://cdn.staticaly.com/gh/DGCK81LNN/dgck81lnn.github.io_old/13df0ab352ba990e2cb7e6ffff4ab7b9b44aaf85/site_icon.png}}
 +
 
 +
== recentchanges ==
 +
 
 +
{{MywikiParaHack|<html>
 +
<table class="wikitable lnnblog-helper-recentchanges"><tr><td>Ajax加载...</td></tr></table>
 +
<script>
 +
$(window).on( "load", function () {
 +
 
 +
function getTimeDesc( ts ) {
 +
var date = new Date( ts )
 +
var delta = Date.now() - date
 +
if ( delta >= 0 ) {
 +
if ( delta < 6e+4 ) return "刚刚"
 +
if ( delta < 3.6e+6 ) return ( 0 | (delta / 6e+4 ) ) + " 分钟前"
 +
if ( delta < 8.64e+7 ) return ( 0 | (delta / 3.6e+6 ) ) + " 小时前"
 +
}
 +
// 手动 UTC+8(
 +
return new Date( date.valueOf() + 2.88e+7 ).toISOString().slice( 0, 10 )
 
}
 
}
.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 ) {
+
new mw.Api()
  var $this = $( this )
+
.get( {
  var $parent = $this.parent()
+
action: "query",
  var $body = $this.nextAll( ".lnnblog-box-body" )
+
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" )
 +
 
 +
try {
 +
if ( !data ) throw "请求失败"
  
  var open = $parent.prop( "open" )
+
var rc = data.query.recentchanges
  var state = $parent.attr( "data-lnnblog-hidebox-state" )
+
if ( !rc.length ) {
 +
container.text( "咕咕咕,最近没有更改记录" )
 +
return
 +
}
  
  if ( !open || state === "shrink" ) {
+
container.html( "" )
    event.preventDefault()
+
var map = {}
    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 )
+
for ( var i = 0; i < rc.length; ++i ) {
    $this.addClass( "lnnblog-hidebox-heading-open" )
+
var title = rc[ i ].title
    $parent
+
if ( rc[ i ].type === "log" ) {
      .attr( "data-lnnblog-hidebox-state", "expand" )
+
if ( rc[ i ].logtype !== "move" ) continue
      .width( currentWidth )
+
map[ title ] = true
      .height( currentHeight )
+
title = rc[ i ].move.new_title
    $parent.animate( {
+
}
        width: targetWidth,
+
if ( map.hasOwnProperty( title ) ) continue
        height: targetHeight
+
map[ title ] = true
      }, {
+
        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 )
+
if ( rc[ i ].type !== "log" )
    $this.removeClass( "lnnblog-hidebox-heading-open" )
+
if ( "redirect" in rc[ i ] ) continue
    $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 ==
+
var ts = rc[ i ].timestamp
  
<html><script>
+
var li = $( "<tr><td data-1></td><td data-2></td></li>" )
$( function () {
+
$( "td[data-1]", li ).text( title )
var newToolbar = $( '<div id="lnnblog-edittoolbar">' )
+
$( "td[data-2]", li ).text( getTimeDesc( ts ) )
$( "#ydnedittoolbar" ).replaceWith(newToolbar)
+
container.append( li )
function addButton(label, before, after, sample) {
+
}
  newToolbar.append( $( "<button>" ).text( label ).click( mw.toolbar.insertTags.bind(mw.toolbar, before, after, sample) ) )
+
} catch (e) {
}bbbdddccc
+
container.text( "加载失败:" + e )
addButton("aaa", "bbb", "ccc", "ddd")
+
throw e
/*
+
}
mw.loader.using("mediawiki.action.edit", function() {
+
} )
//debugger
+
//mw.toolbar.addButton("/skins/common/images/", "", "", "", "", "", "separator", "");
+
mw.toolbar.addButton("/skins/common/images/button_link.png", "内部链接", "[[", "]]", "链接文字", "mw-editbutton-lnnblog-link", "mw", "false");
+
mw.toolbar.addButton("", "内部链接", "[[", "]]", "链接文字", "mw-editbutton-lnnblog-link2", "mw", "false");
+
mw.toolbar.addButton("/skins/common/images/button_category.png", "添加分类", "[[category:", "]]", "分类", "mw-editbutton-lnnblog-cat", "mw", "false");
+
mw.toolbar.addButton("/skins/common/images/button_redirect.png", "重定向页面(需放在页面顶端)", "#REDIRECT[[", "]]", "目标页面", "mw-editbutton-lnnblog-redir", "mw", "false");
+
} )*/
+
 
} )
 
} )
</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加载...