Module:RandomQueue: Difference between revisions
Content deleted Content added
ED Wiki:Featured articles |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
Line 17:
if (mode == "fa" or mode == "both") then
fa_list = mw.title.new('ED Wiki:Featured articles/Canon'):getContent() .. mw.title.new('ED Wiki:Featured articles/Legends'):getContent() .. mw.title.new('ED Wiki:Featured articles/OOU'):getContent()
--fa_list = fa_list:match(listpatt)
end
if (mode == "ga" or mode == "both") then
ga_list = mw.title.new('ED Wiki:
--ga_list = ga_list:match(listpatt)
end
Line 29:
pagename = link:gsub("%[%[(.*)%]%]", "%1")
pagename = pagename:gsub("(.*)%|.*", "%1")
if
list[#list + 1] = pagename
end
Line 40:
math.randomseed(os.time())
num = math.random(1, #list)
pagetext = mw.title.new(list[num]):getContent() or ""
pagetext = pagetext:gsub("%=%=(.*)", "")
filename = pagetext:match(".*%[%[File:(.*)%]%].*")
| |||