notification = {}
function notification.currentPermission()
-- static properties seem to be inaccessible with js.window translation
return js.window.eval("Notification.permission")
end
#meta
command.define {
name = "Page: Rename Leaf",
run = function()
local page_name = editor.getCurrentPage()
local l_start, l_end = page_name:find("[^/]+$")
local path = page_name:sub(1, l_start - 1)
local old_name = page_name:sub(l_start, l_end)