Confirm clearing clipboard history

This commit is contained in:
David Heinemeier Hansson
2026-05-29 12:57:46 +02:00
parent 49ca79081f
commit cf3a481224
3 changed files with 57 additions and 1 deletions
@@ -76,6 +76,10 @@ function removeEntryAt(history, index) {
return next
}
function clearHistory() {
return []
}
function parseEntryJson(line) {
var raw = String(line || "").trim()
if (!raw) return null
@@ -132,6 +136,7 @@ if (typeof module !== "undefined") {
parseHistory: parseHistory,
addEntry: addEntry,
removeEntryAt: removeEntryAt,
clearHistory: clearHistory,
parseEntryJson: parseEntryJson,
searchableText: searchableText,
previewText: previewText,