Skip to content

Commit

Permalink
移除无用注释
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyuesaves committed Jun 12, 2024
1 parent 1d0a02f commit 478c393
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions src/main_modules/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,12 @@ function formatDate(date) {
if (!date) {
date = new Date();
}
// 补零函数
function pad(number) {
return number < 10 ? "0" + number : number;
}

const year = date.getFullYear();
const month = pad(date.getMonth() + 1); // getMonth() 返回 0-11,需加1
const month = pad(date.getMonth() + 1);
const day = pad(date.getDate());

// 你可以自定义格式
return `${year}-${month}-${day}`;
}

Expand Down
3 changes: 0 additions & 3 deletions src/render_modules/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { options } from "./options.js";

const logList = [];

/**
* 暴露日志打印方法
*/
window.LT_logs = () => {
if (options.debug.console) {
logList.forEach((el) => {
Expand Down

0 comments on commit 478c393

Please sign in to comment.