Module:Message box: Difference between revisions

Jump to navigation Jump to search
Testing
Reverting
Line 74: Line 74:
obj.cfg = cfg[boxType]
obj.cfg = cfg[boxType]
if not obj.cfg then
if not obj.cfg then
        styles = 'Module:Message box/styles.css'
local ns = obj.title.namespace
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
-- boxType is "mbox" or invalid input
Line 92: Line 91:
elseif ns == 0 then
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
obj.cfg = cfg.ambox -- main namespace
            styles = 'Module:Message box/styles.css'
elseif ns == 6 then
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
obj.cfg = cfg.imbox -- file namespace
            styles = 'Module:Message box/styles.css'
elseif ns == 14 then
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.cfg = cfg.cmbox -- category namespace
            styles = 'Module:Message box/styles.css'
else
else
local nsTable = mw.site.namespaces[ns]
local nsTable = mw.site.namespaces[ns]
            styles = 'Module:Message box/styles.css'
if nsTable and nsTable.isTalk then
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
obj.cfg = cfg.tmbox -- any talk namespace