Module:Splash: Difference between revisions

204 bytes added ,  12 March 2023
m
Splash can now be chosen if desired. The argument is "splash".
imported>Ttv pedro270707
m (Added special date splashes)
imported>Ttv pedro270707
m (Splash can now be chosen if desired. The argument is "splash".)
Line 2: Line 2:
local splashes = require("Module:Splash/splashes")
local splashes = require("Module:Splash/splashes")


function p.generateSplash()
function p.generateSplash( f )
local args = f
if f == mw.getCurrentFrame() then
args = require( 'Module:ProcessArgs' ).merge( true )
else
f = mw.getCurrentFrame()
end
math.randomseed(os.time())
math.randomseed(os.time())
local randomSplash = "missingno"
local randomSplash = "missingno"
if os.date("*t", os.time()).month == 1 and os.date("*t", os.time()).day == 19 then
if args.splash then
randomSplash = args.splash
elseif os.date("*t", os.time()).month == 1 and os.date("*t", os.time()).day == 19 then
randomSplash = "Happy birthday, jonkadelic!"
randomSplash = "Happy birthday, jonkadelic!"
elseif os.date("*t", os.time()).month == 4 and os.date("*t", os.time()).day == 29 then
elseif os.date("*t", os.time()).month == 4 and os.date("*t", os.time()).day == 29 then