Module:Sandbox/Nyoron/Hide TemplateData explained

p=

local function displayError(message) local format = "

%s" return mw.ustring.format(format, message)end

local function toWikiStyleLink(url, display) local wikiLinkFormat = '[%s %s]' -- [url display] wiki style url reference local wikiLink = mw.ustring.format(wikiLinkFormat, url, display) local spanFormat = '

%s' wikiLink = mw.ustring.format(spanFormat, wikiLink) return wikiLinkend

local function page(pageTitle, namespaceID, preloadFile, summary) local page = page.title = mw.title.new(pageTitle,namespaceID) page.preloadFile = preloadFile page.linkDisplay = mw.site.namespaces[namespaceID].name .. ':' .. pageTitle page.creationSummary = summary page.uri = page.title:fullUrl page.wikiLink = toWikiStyleLink(page.uri, page.linkDisplay) return pageend

p.displayMenu = function(frame) local userPage = page("MyPage/common.css", mw.site.namespaces.Special.id, "User:にょろん/Template/Hide TemplateData/redirect.css", "") return userPage.wikiLinkendreturn p