Changes

Jump to navigation Jump to search
no edit summary
Line 2: Line 2:  
local __version__ = 'scm-1'
 
local __version__ = 'scm-1'
 
local __license__ = 'BSD'
 
local __license__ = 'BSD'
 +
 +
local p = {} -- p stands for package
      Line 87: Line 89:  
     return decoded
 
     return decoded
 
end
 
end
 +
 +
 +
-- This is used by template {{to64}}.
 +
function p.to64(frame)
 +
    local pframe = frame:getParent()
 +
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
 +
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
 +
    return from_base64(args[1])   
 +
end
 +
 +
return p
Anonymous user

Navigation menu