Module:Sandbox/Jackmcbarn: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
use frame.args
Jackmcbarn (talk | contribs)
m Reverted edits by Jackmcbarn (talk) to last version by Le Deluge
Tags: Replaced Rollback
 
(45 intermediate revisions by 2 users not shown)
Line 1:
local getTarget = require('Module:Redirect').getTarget
local p = {}
 
local function p.wastetimepagetype(framensText)
return nsText == '' and 'articles' or (mw.ustring.lower(nsText) .. ' pages')
repeat until os.clock() > 9.5
return '9.5 seconds of Lua time have now elapsed'
end
 
function p.echoArgumentmain(frame)
local currentTitle = mw.title.getCurrentTitle()
return frame.args[1]
local target = getTarget(currentTitle)
end
if target then
 
local currentNsText, targetNsText = currentTitle.nsText, mw.title.new(target).nsText
function p.iterateArgs(frame)
if currentNsText ~= targetNsText then
local dummy = 0
return string.format('[[:Category:Cross-namespace redirects from %s]][[:Category:Cross-namespace redirects to %s]]', pagetype(currentNsText), pagetype(targetNsText))
for k,v in pairs(frame.args) do
end
dummy = dummy + 1
end
return '[[:Category:Pages incorrectly tagged as cross-namespace redirects]]'
return dummy
end
 
function p.checkTime(frame)
return 'os.clock is now ' .. os.clock()
end