Content deleted Content added
is this all it takes |
poke |
||
Line 7:
]]
local function is_preview(frame)
local revision_id =
-- {{REVISIONID}} is usually the empty string when previewed.
-- I don't know why we're checking for nil but hey, maybe someday things
--
return end
Line 26:
]]
function p.if_preview(frame)
if is_preview(frame) then
return frame.args[1] or ''
else
Line 34:
--[[
warning
This function returns a "preview warning", which is the first argument marked
Line 44:
]]
function p.warning(frame)
local warning = frame.args[1]:match('^%s*(.-)%s*$') or ''
Line 54:
return mw.ustring.format(
'%s<div class="preview-warning"><strong>Preview warning
frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Preview warning/styles.css' }
},
warning
)
|