Module:IsRedirect

From Dive Atlas

Documentation for this module may be created at Module:IsRedirect/doc

local i = {}
 
function i.IsRedirect(frame)
    local pagename = frame.args[1];
    if pagename == '' then
        return '';
    end
    
    local page = mw.title.new(pagename);
    if page.isRedirect then
        return 'yes';
    else
        return '';
    end
end
 
return i;