MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / permanentDeleteNote

Function permanentDeleteNote

notes.js:4068–4080  ·  view source on GitHub ↗
(trashIndex)

Source from the content-addressed store, hash-verified

4066
4067 // 永久删除笔记
4068 function permanentDeleteNote(trashIndex) {
4069 const trashData = readJSON(LS_KEYS.trash, []);
4070 if (trashIndex < 0 || trashIndex >= trashData.length) {
4071 alert('找不到要删除的笔记');
4072 return;
4073 }
4074
4075 trashData.splice(trashIndex, 1);
4076 writeJSON(LS_KEYS.trash, trashData);
4077
4078 // 更新按钮文本
4079 updateButtonTexts();
4080 }
4081
4082 // 清理过期的回收站笔记(30天)
4083 function cleanExpiredTrashNotes() {

Callers 1

showTrashDialogFunction · 0.85

Calls 3

readJSONFunction · 0.85
writeJSONFunction · 0.85
updateButtonTextsFunction · 0.85

Tested by

no test coverage detected