MCPcopy
hub / github.com/zxlie/FeHelper / clearLogs

Function clearLogs

apps/page-monkey/index.js:723–733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

721 });
722 },
723 async clearLogs() {
724 let ok = await this.confirmDialog({
725 type: 'warning',
726 title: '清空所有运行日志?',
727 message: '将清空最近 300 条日志记录。',
728 confirmText: '清空', cancelText: '取消'
729 });
730 if (!ok) return;
731 let d = {}; d[PAGE_MONKEY_LOG_KEY] = '[]';
732 chrome.storage.local.set(d, () => { this.logs = []; this.errorBadge = 0; });
733 },
734 formatTime(t) {
735 if (!t) return '';
736 let d = new Date(t);

Callers

nothing calls this directly

Calls 1

setMethod · 0.80

Tested by

no test coverage detected