Module:If preview: Difference between revisions

replace is_set with code from Module:Citation/CS1/Utilities. Note previous edit was derived from Module:Citation/CS1/sandbox code.
(module to help templates/modules determine if they are being previewed)
 
(replace is_set with code from Module:Citation/CS1/Utilities. Note previous edit was derived from Module:Citation/CS1/sandbox code.)
Line 14:
local result = ''
Preview_mode = frame:preprocess('{{REVISIONID}}'); -- use magic word to get revision id
if is_setnot (Preview_mode == nil or Preview_mode == '') then -- if there is a value then this is not a preiview
result = frame.args[2] or '';
else
Line 36:
local result = ''
Preview_mode = frame:preprocess('{{REVISIONID}}'); -- use magic word to get revision id
if is_setnot (Preview_mode == nil or Preview_mode == '') then -- if there is a value then this is not a preiview
result = frame.args[2]
else
Line 57:
local result = ''
Preview_mode = frame:preprocess('{{REVISIONID}}'); -- use magic word to get revision id
if is_setnot (Preview_mode == nil or Preview_mode == '') then -- if there is a value then this is not a preiview
result = false;
else
Anonymous user