Modul:Vorlage:Anker: Unterschied zwischen den Versionen
2019-12-24
(2019-12-23) |
(2019-12-24) |
||
Zeile 1: | Zeile 1: | ||
local Anchor = { suite = "AnchorTemplate", | local Anchor = { suite = "AnchorTemplate", | ||
serial = "2019-12- | serial = "2019-12-24", | ||
item = 79414611 | item = 79414611 | ||
} | } | ||
Zeile 26: | Zeile 26: | ||
"siteNotice", | "siteNotice", | ||
"siteSub", | "siteSub", | ||
"toc", | |||
"top" }, | "top" }, | ||
globalPatterns = { "^mw%-[%l%-]+$", | globalPatterns = { "^mw%-[%l%-]+$", | ||
Zeile 155: | Zeile 156: | ||
if Config.errCat then | if Config.errCat then | ||
if Config.errNS then | if Config.errNS then | ||
local st = type( Config.errNS ) | local st = type( Config.errNS ) | ||
if st == " | if st == "number" then | ||
st = { } | |||
table.insert( st, Config.errNS ) | |||
Config.errNS = st | |||
Config.errNS = | elseif st == "string" then | ||
end | Config.errNS = mw.text.split( Config.errNS, "%s+" ) | ||
for i = 1, #Config.errNS do | |||
Config.errNS[ i ] = tonumber( Config.errNS[ i ] ) | |||
end -- for i | |||
end | |||
if type( Config.errNS ) == "table" then | |||
local ns = mw.title.getCurrentTitle().namespace | |||
for i = 1, #Config.errNS do | for i = 1, #Config.errNS do | ||
if Config.errNS[ i ] == ns then | if Config.errNS[ i ] == ns then | ||
Zeile 193: | Zeile 198: | ||
Config.errNS = argsF.errNS | Config.errNS = argsF.errNS | ||
if mw.site.server:find( "de.wikipedia.org", 1, true ) then | if mw.site.server:find( "de.wikipedia.org", 1, true ) then | ||
Config.errClasses = "Linkwartung" | |||
Config.errHide = true | |||
Config.errNS = 0 | Config.errNS = 0 | ||
end | end | ||
end | end | ||
Zeile 366: | Zeile 372: | ||
for k = 1, #Config.globalPage do | for k = 1, #Config.globalPage do | ||
e = mw.html.create( "code" ) | e = mw.html.create( "code" ) | ||
:css( "white-space", "nowrap" ) | |||
:wikitext( Config.globalPage[ k ] ) | :wikitext( Config.globalPage[ k ] ) | ||
r = string.format( "%s%s%s", r, sep, tostring( e ) ) | r = string.format( "%s%s%s", r, sep, tostring( e ) ) |