Editing Module:Sandbox/Dragoniez
From Test Wiki
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 20: | Line 20: | ||
pagetitle = username | pagetitle = username | ||
elseif username:find('^[Uu][Ss][Ee][Rr]:') ~= nil then | elseif username:find('^[Uu][Ss][Ee][Rr]:') ~= nil then | ||
pagetitle = username:gsub('^[Uu][Ss][Ee][Rr]:', '利用者:') | |||
else | else | ||
pagetitle = '利用者:' .. username | |||
end | end | ||
Line 37: | Line 28: | ||
local displayText | local displayText | ||
if prefix == 'none' then | if prefix == 'none' then | ||
displayText = pagetitle:gsub('^利用者:', '') | |||
else | else | ||
displayText = pagetitle | displayText = pagetitle | ||
end | |||
if mw.title.new(pagetitle).exists then | |||
displayText = '<span class="ul-page-exists">' .. displayText ..'</span>' | |||
else | |||
displayText = '<span class="ul-page-missing">' .. displayText ..'</span>' | |||
end | end | ||
Line 47: | Line 43: | ||
--local templatestyles = frame:extensionTag{name = 'templatestyles', args = {src = 'Template:UserLink/styles.css'}} | --local templatestyles = frame:extensionTag{name = 'templatestyles', args = {src = 'Template:UserLink/styles.css'}} | ||
local templatestyles = frame:extensionTag{name = 'templatestyles', args = {src = 'User:Dragoniez/Template:UserLink/styles.css'}} | local templatestyles = frame:extensionTag{name = 'templatestyles', args = {src = 'User:Dragoniez/Template:UserLink/styles.css'}} | ||
local link = templatestyles .. '<span class="plainlinks | local link = templatestyles .. '<span class="plainlinks">' .. extlink .. '</span>' | ||
return link | return link |