mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 02:59:20 +01:00
17 lines
357 B
Lua
17 lines
357 B
Lua
local Clipboard = {
|
|
maxHistory = 2,
|
|
history = {}
|
|
}
|
|
|
|
function Clipboard.copy(content)
|
|
table.insert(Clipboard.history,1,content)
|
|
while #Clipboard.history > Clipboard.maxHistory do
|
|
table.remove(Clipboard.history, Clipboard.maxHistory + 1)
|
|
end
|
|
end
|
|
|
|
function Clipboard.paste()
|
|
return Clipboard.history[1]
|
|
end
|
|
|
|
return Clipboard |