Модуль:Песочница/Pok: различия между версиями

мНет описания правки
Нет описания правки
Строка 1: Строка 1:
local p = {}
local p = {}


function p.info()
function p.increment(frame)
     local engine = _G['jit'] and "LuaJIT (luastandalone)" or "LuaSandbox"
     local content = mw.title.getCurrentTitle():getContent()
     return "'''Lua Engine:''' " .. engine
    local currentCount = tonumber(content:match('<!--callCount:(%d+)-->')) or 0
    local newCount = currentCount + 1
     mw.title.getCurrentTitle():edit(content .. '\n<!--callCount:' .. newCount .. '-->')
    return "Количество вызовов: " .. newCount
end
end


return p
return p