Module:Region Switcher: Difference between revisions
Jump to navigation
Jump to search
(username removed) No edit summary |
m (Protected "Module:Region Switcher": structural page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
local p={} | local p={} | ||
function p.regionSwitcher(frame) | function p.regionSwitcher(frame) | ||
local nameWithoutSuffix= | local nameWithoutSuffix=mw.title.getCurrentTitle().prefixedText:gsub(' %(Asia%)',''):gsub('%(China%)','') | ||
return [=[{| style="margin: auto; text-align: center" class="toccolours" | return [=[{| style="margin: auto; text-align: center" class="toccolours" | ||
! style="background:#cceeff" width="120px"|Region Switcher | ! style="background:#cceeff" width="120px"|Region Switcher |
Latest revision as of 00:07, 24 June 2023
Documentation for this module may be created at Module:Region Switcher/doc
local p={}
function p.regionSwitcher(frame)
local nameWithoutSuffix=mw.title.getCurrentTitle().prefixedText:gsub(' %(Asia%)',''):gsub('%(China%)','')
return [=[{| style="margin: auto; text-align: center" class="toccolours"
! style="background:#cceeff" width="120px"|Region Switcher
|-
| style="font-size:90%;"| [[]=]..nameWithoutSuffix..[=[|Japan]] - [[]=]..nameWithoutSuffix..[=[ (Asia)|Asia]] - [[]=]..nameWithoutSuffix..[=[ (China)|China]]
|}]=]
end
return p