1,133
个编辑
小 (ulk测试) |
小 (调整) |
||
第70行: | 第70行: | ||
end | end | ||
local function judgeRow(row) | local function judgeRow(row) | ||
local res = {} | local res = {'ulk'} | ||
for _, k in ipairs(names) do if row[k] > 0 then table.insert(res, | for _, k in ipairs(names) do if row[k] > 0 then table.insert(res, k) end end | ||
return | return ('class="%s"'):format(table.concat(res, ' ')) | ||
end | end | ||
第93行: | 第93行: | ||
row[rc] = cell | row[rc] = cell | ||
end | end | ||
table.insert(cell, tostring(mw.html.create 'span':addClass | table.insert(cell, tostring(mw.html.create 'span':addClass 'ulk':addClass(className):wikitext(stringify(cond)))) | ||
end | end | ||
end | end | ||
第114行: | 第114行: | ||
end | end | ||
local className = judgeRow(row) | local className = judgeRow(row) | ||
if id == 'lasteternity' then className = '' end | if id == 'lasteternity' then className = 'class="ulk"' end | ||
table.insert(texts, { | table.insert(texts, { | ||
data = rowFormat:format(className, mLink[id], unpack(rowText)), | data = rowFormat:format(className, mLink[id], unpack(rowText)), |
个编辑