Skip to content

Commit

Permalink
🔥 rm: 重复文档模块的测试代码
Browse files Browse the repository at this point in the history
  • Loading branch information
frostime committed Apr 16, 2024
1 parent a98f5b4 commit d2c53d6
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/func/dailynote/handle-duplicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,30 +342,3 @@ export async function checkDuplicateDiary(): Promise<boolean> {
});
return true;
}


//TODO: 测试用,记得删除
const addTestBtn = () => {
let btn = document.createElement('button');
Object.assign(btn.style, {
position: 'fixed',
bottom: '50px',
right: '50px',
zIndex: '1000',
});
btn.classList.add('b3-button', 'b3-button--primary');
btn.innerText = '检查重复日记';
btn.onclick = async () => {
let flag = await checkDuplicateDiary();
if (flag) {
showMessage('Debug: 有重复日记');
} else {
showMessage('Debug: 没有重复日记');
}
};
document.body.appendChild(btn);
}

if (process.env.DEV_MODE === "true") {
addTestBtn();
}

0 comments on commit d2c53d6

Please sign in to comment.