模組:沙盒/WhitePhosphorus/+1
外观
local p = {}
local getArgs = require('Module:Arguments').getArgs
local function plusoners(plusoner)
return table.concat(plusoner, '、')
end
local function action()
return '为此+1了。'
end
function p.main(frame)
local plusoner = {}
local args = getArgs(frame)
for i, v in ipairs(args) do
table.insert(plusoner, v)
end
return '<span style="display: inline-block; height: 1.5em; line-height: 1.5em; text-indent: 0;">' ..
'<span class="plusone" style="color: #36C; cursor: pointer;' ..
'font-family: DejaVu Sans, Helvetica Neue, Helvetica, Arial, sans-serif;' ..
'font-style: italic; font-weight: bold;" title="' ..
plusoners(plusoner) .. action() .. '' .. '">+' ..
tostring(#plusoner) .. '</span>'
end
return p