Anonymous user
Module:Shortcut: Difference between revisions
use redirect=no
Enwikipedia>Mr. Stradivarius (create replacement for Template:Shortcut) |
Enwikipedia>Mr. Stradivarius (use redirect=no) |
||
Line 29:
local anchorEncode = mw.uri.anchorEncode
local format = string.format
local fullUrl = mw.uri.fullUrl
--------------------------------------------------------------------------------
Line 81 ⟶ 82:
listArgs[#listArgs + 1] = link
end
listArgs.class = 'plainlinks'
return mList.makeList('bulleted', listArgs)
end
function p.makeShortcutLink(s)
local uriObj = fullUrl(s, {redirect = 'no'})
return format('[[%s]]', s)▼
local url = tostring(uriObj)
end
Line 101 ⟶ 105:
function p.export(anchors, nShortcuts, shortcutList, errorCategories)
local root = mw.html.create('')
root
:css{position = 'relative', top = '-3em'}
:wikitext(anchors)▼
:
root
:
:addClass('shortcutbox noprint')
:css{
['text-align'] = 'center'
}
▲ :tag('tr')
:tag('
:
:addClass('plainlist')
:css{border = 'none', background = 'transparent'}
:
nShortcuts <= 1
or cfg.shortcutHeaderPlural
:
root:wikitext(errorCategories)
return tostring(root)
|