Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:DropList
(view source)
Revision as of 03:12, 17 October 2015
5 bytes added
,
10 years ago
fix displaying for unknown diff.
Line 3:
Line 3:
function trim(str)
function trim(str)
−
return str:match(
"
^%s*(.-)%s*$
"
)
+
return str:match(
'
^%s*(.-)%s*$
'
)
end
end
Line 14:
Line 14:
local colors = {
local colors = {
−
[
"
Easy
"
] =
"
5a5
"
,
+
[
'
Easy
'
] =
'
5a5
'
,
−
[
"
Medium
"
] =
"
da6
"
,
+
[
'
Medium
'
] =
'
da6
'
,
−
[
"
Hard
"
] =
"
d33
"
+
[
'
Hard
'
] =
'
d33
'
}
}
Line 49:
Line 49:
-- TODO: check node/difficulty existence?
-- TODO: check node/difficulty existence?
if diff and colors[diff] then
if diff and colors[diff] then
−
row.nodes[node] = { color = colors[diff], diff = diff }
+
row.nodes[node] = { color = colors[diff], diff = diff
.. '+'
}
else
else
−
row.nodes[node] = { color = "
fff
", diff =
diff
}
+
row.nodes[node] = { color = "
0ff
", diff =
'?'
}
end
end
end
end
Line 66:
Line 66:
header_boss_node = '!width="10%%" style="background-color:pink;color:red;"|\'\'\'%s\'\'\'\n',
header_boss_node = '!width="10%%" style="background-color:pink;color:red;"|\'\'\'%s\'\'\'\n',
ship_cell = '|-\n|[[%s]]\n',
ship_cell = '|-\n|[[%s]]\n',
−
node_cell = '|style="background-color:#%s;"|%s
+
\n',
+
node_cell = '|style="background-color:#%s;"|%s\n',
empty_cell = '|\n',
empty_cell = '|\n',
footer = '|}\n'
footer = '|}\n'
がか
cssedit, gkautomate,
Interface administrators
,
Widget editors
7,212
edits