Module:Documentation: Difference between revisions

Use mw.html to improve code readability; add jump link to the code on appropriate pages (module, css and js); and namespace variables
Fix type on doc page
Line 5: Line 5:
if namespace == 'Module' then
if namespace == 'Module' then
pageType = 'module'
pageType = 'module'
elseif page.fullText:find( '%.css$' ) then
elseif page.fullText:gsub( '/doc$', '' ):find( '%.css$' ) then
pageType = 'stylesheet'
pageType = 'stylesheet'
elseif page.fullText:find( '%.js$' ) then
elseif page.fullText:gsub( '/doc$', '' ):find( '%.js$' ) then
pageType = 'script'
pageType = 'script'
elseif namespace == 'MediaWiki' then
elseif namespace == 'MediaWiki' then