Module:Large category TOC/sandbox: Difference between revisions

Content deleted Content added
Create sandbox version of Module:Large category TOC
 
No edit summary
Line 7:
-- Implements [[Template:Large Category TOC]]
function p.scrollable(frame)
return make(false,true,true)
end
 
function p.collapsible(frame)
return make(true,false,true)
end
 
function p.make(collapsible,scrollable,fullaz)
-- It should be much faster to only process these once, and just re use them as variables
local pageurl = frame:preprocess('{{fullurl:{{FULLPAGENAME}}}}')
Line 39 ⟶ 43:
'\n----'..
'\n<code style="background:White;"> <b>#</b>'
else if scrollable then
toc_string = toc_string..'<div style="overflow-x:auto; overflow-y:hidden; width:98%;"><span class="plainlinks">'
end
end
-- Add ?from=0 through 9 to the list
Line 79 ⟶ 86:
toc_string = toc_string..'\n</code>\n</div></div></div>'
else
if scrollable then
toc_string = toc_string..'\n</div>'
end
toc_string = toc_string..'\n</span></div></div>'
end