Editing Module:Message box
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 66: | Line 66: | ||
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 83: | Line 84: | ||
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 |