This commit is contained in:
Никита Круглицкий
2025-05-11 08:18:33 +06:00
parent 14ab069846
commit a6c89e2f21
13 changed files with 229 additions and 51 deletions

View File

@@ -72,4 +72,15 @@ function isURL(str)
local _1, _2, prefix = str:find("^(%w-):")
return prefix == "http" or prefix == "https" or prefix == "data"
end
function debounce(func, delay)
local lastCall = 0
return function(...)
local now = timer.systime()
if now - lastCall >= delay then
lastCall = now
return func(...)
end
end
end