159
edits
scape_>Chen m (why don't these work) |
m (20 revisions imported) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 4: | Line 4: | ||
rsc = { | rsc = { | ||
format = 'The RuneScape Classic Wiki also has an article on: [[classicrsw:%s]]', | format = 'The RuneScape Classic Wiki also has an article on: [[classicrsw:%s]]', | ||
params = { 'rsc | params = { 'rsc' }, | ||
abbr = 'CS', | abbr = 'CS', | ||
title = 'The RuneScape Classic Wiki also has an article on %s.', | title = 'The RuneScape Classic Wiki also has an article on %s.', | ||
Line 10: | Line 10: | ||
rs = { | rs = { | ||
format = 'The RuneScape Wiki also has an article on: [[rsw:%s]]', | format = 'The RuneScape Wiki also has an article on: [[rsw:%s]]', | ||
params = { | params = { 'rs' }, | ||
abbr = 'RuneScape', | abbr = 'RuneScape', | ||
title = 'The RuneScape Wiki also has an article on %s.', | title = 'The RuneScape Wiki also has an article on %s.', | ||
Line 16: | Line 16: | ||
wp = { | wp = { | ||
format = 'Wikipedia also has an article on: [[wikipedia:%s]]', | format = 'Wikipedia also has an article on: [[wikipedia:%s]]', | ||
params = { | params = { 'wp' }, | ||
abbr = 'Wikipedia', | abbr = 'Wikipedia', | ||
title = 'Wikipedia also has an article on %s.', | title = 'Wikipedia also has an article on %s.', | ||
}, | }, | ||
meta = { | |||
format = '[[meta:%s]]', | format = '[[meta:%s]]', | ||
params = { 'meta | params = { 'meta' }, | ||
abbr = 'Weird Gloop', | abbr = 'Weird Gloop', | ||
title = 'The Weird Gloop meta wiki also has an article on %s.', | title = 'The Weird Gloop meta wiki also has an article on %s.', | ||
Line 28: | Line 28: | ||
} | } | ||
local order = { 'rs', 'rsc', 'wp', ' | local order = { 'rs', 'rsc', 'wp', 'meta' } | ||
local allparams = {} | local allparams = {} | ||
Line 34: | Line 34: | ||
function p.main(frame) | function p.main(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
return p._main(args) | |||
end | |||
function p._main(args) | |||
local pagename = mw.title.getCurrentTitle().fullText | local pagename = mw.title.getCurrentTitle().fullText | ||
local vals = {} | local vals = {} | ||
Line 62: | Line 66: | ||
local ret = mw.html.create('div') | local ret = mw.html.create('div') | ||
ret:addClass('rs-external-header-links'):css('display', 'none') | ret:addClass('noexcerpt noprint nomobile navigation-not-searchable rs-external-header-links'):css('display', 'none') | ||
for _,v in ipairs(order) do | for _,v in ipairs(order) do | ||
if vals[v] then | if vals[v] then | ||
Line 76: | Line 80: | ||
end | end | ||
return tostring(ret) | return tostring(ret) | ||
end | end | ||
return p | return p |