luapage/corescripts/_global.lua

22 lines
335 B
Lua
Raw Normal View History

2021-05-02 15:07:43 +03:00
--[[ utility functions ]]--
2021-05-03 14:51:05 +03:00
--
2021-05-02 15:07:43 +03:00
--[[ page module ]]--
page = {}
2021-05-03 14:51:05 +03:00
function page.Set(text)
__ext_pageview_set_content(text)
end
2021-05-02 15:07:43 +03:00
2021-05-03 14:51:05 +03:00
function page.Append(content)
for i, v in pairs(content) do
__ext_pageview_append_tag("t", v[1] or v)
2021-05-02 15:07:43 +03:00
end
2021-05-03 14:51:05 +03:00
end
function page.Commit(content)
page.Set("")
page.Append(content)
2021-05-02 15:07:43 +03:00
end