Content deleted Content added
No edit summary |
Changed: – → – for home & road records to prevent line breaks |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 17:
local highlight = "#CCFFCC"
local
local divleadermark = " *"
local function get_division(division)
Line 43 ⟶ 44:
local function winpct(w, l)
local pct = '–'
if (w + l) > 0 then
end
return
end
Line 65 ⟶ 67:
local division = args['division']:lower()
-- division leader record
local dloffset = 8*((tonumber(args[division .. 'leader']) or 1) - 1)
local dlhw = tonumber(args[dloffset + 3])
local dlhl = tonumber(args[dloffset + 4])
Line 123 ⟶ 125:
row:tag('td'):wikitext(gbformat(hw, hl, rw, rl, dlhw, dlhl, dlrw, dlrl))
-- home record
row:tag('td'):wikitext(hw .. '
-- road record
row:tag('td'):wikitext(rw .. '
-- div record
row:tag('td'):wikitext(divrecord)
Line 169 ⟶ 171:
-- rows
local pos = 1
local div1leader = tonumber(args[(args['div1name'] or
local div2leader = tonumber(args[(args['div2name'] or
local div3leader = tonumber(args[(args['div3name'] or
while args[(pos - 1)*8 + 1] or args[(pos - 1)*8 + 2] do
local offset = (pos - 1)*8
Line 205 ⟶ 207:
-- played
row:tag('td'):wikitext(hw + hl + rw + rl)
if args['split' .. pos] then
root:tag('tr'):css('background-color', splitcolor):tag('td'):attr('colspan', 7)
end
pos = pos + 1
end
|