Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 13:54, 20 November 2024 by Sorenesss (talk | contribs)

Documentation for this module may be created at Module:Soreness/doc

local p = {}

function p.test(frame)
    local class = {}
    table.insert(class, "growsprite")

    local newwidth = frame.args[2] or "32"
    local file = frame.args[1] or "Bingo_Card.png"
    local imgFilePath = mw.getCurrentFrame():preprocess("{{filepath:"..file.."}}")
    local baseUrl, queryString = imgFilePath:match("([^?]+)%?(.+)")

    local imgTag = baseUrl..'/revision/latest/scale-to-width-down/'..newwidth

    return "<span class='" .. table.concat(class, " ") .. "'>" .. imgTag .. "</span>[[Category:AutoPurge]]"
end
 
return p