View source for Module:Redirect
From Funkinchan
Jump to navigationJump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- This module provides functions for getting the target of a redirect page.
local p = {}
-- Gets a mw.title object, using pcall to avoid generating script errors if we
-- are over the expensive function count limit (among other possible causes).
local function getTitle(...)
local success, titleObj = pcall(mw.title.new, ...)
if success then
return titleObj
else
return nil
end
end
-- Gets the name of a page that a redirect leads to, or nil if it isn't a
-- redirect.
function p.getTargetFromText(text)
local target = string.match(
text,
000
1:0
Templates used on this page:
- Articles for deletion (view source)
- Articles for rumination (view source)
- WP:AFC (view source)
- WP:AFD (view source)
- Template:Lua (view source)
- Template:Module other (view source)
- Template:Module rating (view source)
- Template:Sandbox other (view source)
- Template:Used in system (view source)
- Module:Arguments (view source)
- Module:Effective protection level (view source)
- Module:High-use (view source)
- Module:List (view source)
- Module:Lua banner (view source)
- Module:Message box (view source)
- Module:Message box/configuration (view source)
- Module:Message box/ombox.css (view source)
- Module:Redirect (view source)
- Module:Redirect/doc (view source)
- Module:String (view source)
- Module:TableTools (view source)
- Module:Transclusion count (view source)
- Module:Transclusion count/data/R (view source)
- Module:Yesno (view source)
Return to Module:Redirect.