Module:Sandbox/SiBr4
Appearance
local p = {}
function p.width( frame )
local size
local ow
local oh
local wh
local w
size = frame["args"][1]
ow = string.find(size,"\d+px")
oh = string.find(size,"x\d+px")
wh = string.find(size,"\d+x\d+px")
if not ow == nil then
w = string.gsub(size,"(\d+)px","$1")
else
if not oh == nil then
w = string.gsub(size,"x(\d+)px","$1")
w = w * 2
else
if not wh == nil then
w = string.gsub(size,"(\d+)x\d+px","$1")
end
end
end
w = w + 5
return w
end
return p