Module:Sprite: Difference between revisions

Jump to navigation Jump to search
m
uhhh
m (ISTHISIT)
m (uhhh)
Line 311: Line 311:
if self.__settings.link then
if self.__settings.link then
sprite = html:tag("span")
sprite = html:tag("span")
local parentDiv = mw.html.create("span"):css("position","relative")
local link = self.__settings.link
local link = self.__settings.link
if link:sub ( 1,1 ) == '[' then
if link:sub ( 1,1 ) == '[' then
parentDiv:wikitext(link:sub( 1,#link-1 ) .. '|')
local parentDiv = mw.html.create("a"):attr("href",link:sub ( 2,#link-1 ))
else
return parentDiv
if link:sub ( 1,1 ) == '#' then
end
if link:sub ( 1,1 ) == '#' then
parentDiv:wikitext('[[')
local section_id = self.__source.ids[itemName].section
for index, tab in pairs(self.__source.sections) do
local section_id = self.__source.ids[itemName].section
if tab.id == section_id then
for index, tab in pairs(self.__source.sections) do
local parentDiv = mw.html.create("a"):attr("href","/" .. tab.name .. "/" .. link:sub ( 2,#link ))
if tab.id == section_id then
return parentDiv
local section_name = tab.name
parentDiv:wikitext(tab.name)
break
end
end
end
end
end
parentDiv:wikitext('#' .. link .. '|')
end
end
if string.match(link, "%#") then
parentDiv:node(sprite)
local parentDiv = mw.html.create("a"):attr("href","/" .. link)
return parentDiv
if link:sub( 1,1 ) == '[' then
parentDiv:wikitext(']')
else
parentDiv:wikitext(']]')
end
end
return parentDiv
end
end


Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,633

edits

Navigation menu