Module:SiteList: Difference between revisions

Jump to navigation Jump to search
188 bytes added ,  21 July 2023
no edit summary
No edit summary
No edit summary
 
local function createURL(site, id, sceneid)
site = string.lower(site) -- приводим имя сайта к нижнему регистру
local site_data = mw.loadData('Module:SiteDictionary')[site]
if site_data then
local url = site_data.base_url
 
if sceneid then
url = url .. string.format(site_data.scene_url, sceneid)
elseif id then
url = url .. string.format(site_data.id_url, id)
end
 
return url
else
return ''
end
end
 

Navigation menu