Module:High-use and Module:High-use/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
Fix fetch=no and no-percent=yes |
more sandbox-specific code testing |
||
Line 97: | Line 97: | ||
title = title.basePageTitle |
title = title.basePageTitle |
||
end |
end |
||
local viewingFromSandbox = string.match(title.text,"/sandbox$") |
|||
local systemMessages = (args['system'] or '') ~= '' |
local systemMessages = (args['system'] or '') ~= '' |
||
Line 104: | Line 106: | ||
title:fullUrl():gsub('//(.-)/.*', '%1'), |
title:fullUrl():gsub('//(.-)/.*', '%1'), |
||
mw.uri.encode(title.fullText), p._num(args, count)) |
mw.uri.encode(title.fullText), p._num(args, count)) |
||
local used_on_text = (viewingFromSandbox and "'''The live version of this " or "'''This ") .. (title.namespace == 828 and "Lua module" or "template") .. ' is used '; |
|||
if systemMessages then |
if systemMessages then |
||
used_on_text = used_on_text .. args['system'] .. |
used_on_text = used_on_text .. args['system'] .. |
||
Line 142: | Line 144: | ||
end |
end |
||
if viewingFromSandbox then |
|||
⚫ | |||
return used_on_text --More basic view from the sandbox |
|||
else |
|||
⚫ | |||
end |
|||
end |
end |
||
function p.text(frame, count) |
function p.text(frame, count) |