词条 | Module:Sandbox/Nyoron/Hide TemplateData |
释义 | p={} local function displayError(message) 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 wikiLink end 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{action = 'edit', preload = page.preloadFile, summary = page.creationSummary} page.wikiLink = toWikiStyleLink(page.uri, page.linkDisplay) return page end p.displayMenu = function(frame) local userPage = page("MyPage/common.css", mw.site.namespaces.Special.id, "User:にょろん/Template/Hide TemplateData/redirect.css", "" ) return userPage.wikiLink end return p |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。