今天是2024年7月3日 第27周 星期三

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

更改

跳到导航 跳到搜索
删除320字节 、 2014年6月7日 (六) 10:19
mw.html
第1行: 第1行:  
local z = {}
 
local z = {}
local HtmlBuilder = require( 'Module:HtmlBuilder' )
   
local WikitextLC = require( 'Module:WikitextLC' )
 
local WikitextLC = require( 'Module:WikitextLC' )
   第7行: 第6行:  
      return ''
 
      return ''
 
    end
 
    end
    local builder = HtmlBuilder.create()
+
    local div = mw.html.create( 'div' )
   local div = builder.tag( 'div' )
+
      :attr( 'id', 'noteTA-title' )
      .attr( 'id', 'noteTA-title' )
+
      :attr( 'data-noteta-code', mw.uri.encode( args.T ) )
      .attr( 'data-noteta-code', mw.uri.encode( args.T ) )
+
      :wikitext( WikitextLC.title( args.T ) )
      .wikitext( WikitextLC.title( args.T ) )
   
    if args.dt ~= nil and args.dt ~= '' then
 
    if args.dt ~= nil and args.dt ~= '' then
      div.attr( 'data-noteta-desc', mw.uri.encode( args.dt ) )
+
      div:attr( 'data-noteta-desc', mw.uri.encode( args.dt ) )
 
    end
 
    end
    return tostring( builder )
+
    return tostring( div )
 
end
 
end
   第26行: 第24行:  
      return frame:expandTemplate{ title = title }
 
      return frame:expandTemplate{ title = title }
 
    else
 
    else
      return tostring( HtmlBuilder.create()
+
      return tostring( mw.html.create( 'div' )
       .tag( 'div' )
+
          :attr( 'id', 'noteTA-group-' .. mw.uri.anchorEncode( name ) )
          .attr( 'id', 'noteTA-group-' .. mw.uri.anchorEncode( name ) )
+
          :attr( 'class', 'noteTA-missing' )
          .attr( 'class', 'noteTA-missing' )
+
          :attr( 'data-noteta-group', name ) )
          .attr( 'data-noteta-group', name )
  −
       .allDone() )
   
    end
 
    end
 
end
 
end
第42行: 第38行:  
    code = table.concat( code )
 
    code = table.concat( code )
 
    if code ~= '' then
 
    if code ~= '' then
      code = tostring( HtmlBuilder.create()
+
      code = tostring( mw.html.create( 'div' )
       .tag( 'div' )
+
          :attr( 'id', 'noteTA-group' )
          .attr( 'id', 'noteTA-group' )
+
          :wikitext( code ) )
          .wikitext( code )
  −
       .allDone() )
   
      if args.G31 ~= nil then
 
      if args.G31 ~= nil then
 
        code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|G]]'
 
        code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|G]]'
第58行: 第52行:  
      return ''
 
      return ''
 
    end
 
    end
    local builder = HtmlBuilder.create()
+
    local div = mw.html.create( 'div' )
   local div = builder.tag( 'div' )
+
      :attr( 'id', 'noteTA-local-' .. i )
      .attr( 'id', 'noteTA-local-' .. i )
+
      :attr( 'data-noteta-code', mw.uri.encode( code ) )
      .attr( 'data-noteta-code', mw.uri.encode( code ) )
+
      :wikitext( WikitextLC.hidden( code ) )
      .wikitext( WikitextLC.hidden( code ) )
   
    if desc ~= nil and desc ~= '' then
 
    if desc ~= nil and desc ~= '' then
      div.attr( 'data-noteta-desc', mw.uri.encode( desc ) )
+
      div:attr( 'data-noteta-desc', mw.uri.encode( desc ) )
 
    end
 
    end
    return tostring( builder )
+
    return tostring( div )
 
end
 
end
   第76行: 第69行:  
    code = table.concat( code )
 
    code = table.concat( code )
 
    if code ~= '' then
 
    if code ~= '' then
      code = tostring( HtmlBuilder.create()
+
      code = tostring( mw.html.create( 'div' )
       .tag( 'div' )
+
          :attr( 'id', 'noteTA-local' )
          .attr( 'id', 'noteTA-local' )
+
          :wikitext( code ) )
          .wikitext( code )
  −
       .allDone() )
   
      if args[31] ~= nil then
 
      if args[31] ~= nil then
 
        code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|L]]'
 
        code = code .. '[[Category:NoteTA模板参数使用数量超过限制的页面|L]]'
第105行: 第96行:  
          size = '35px',
 
          size = '35px',
 
        },
 
        },
      } .. tostring( HtmlBuilder.create()
+
      } .. tostring( mw.html.create( 'div' )
       .tag( 'div' )
+
          :attr( 'id', 'noteTA' )
          .attr( 'id', 'noteTA' )
+
          :wikitext( code ) )
          .wikitext( code )
  −
       .allDone() )
   
      if mw.title.getCurrentTitle():inNamespace( 'Template' ) then
 
      if mw.title.getCurrentTitle():inNamespace( 'Template' ) then
 
        code = code .. '[[Category:放置于模板的noteTA]]'
 
        code = code .. '[[Category:放置于模板的noteTA]]'
匿名用户

导航菜单