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

Function showNotification

apps/chart-maker/main.js:283–306  ·  view source on GitHub ↗
(message, isError = false)

Source from the content-addressed store, hash-verified

281
282 // 显示通知
283 function showNotification(message, isError = false) {
284 // 移除现有通知
285 const existingNotification = document.querySelector('.notification');
286 if (existingNotification) {
287 existingNotification.remove();
288 }
289
290 // 创建新通知
291 const notification = document.createElement('div');
292 notification.className = 'notification' + (isError ? ' error' : '');
293 notification.textContent = message;
294
295 // 添加到文档
296 document.body.appendChild(notification);
297
298 // 显示通知
299 setTimeout(() => notification.classList.add('show'), 10);
300
301 // 自动隐藏
302 setTimeout(() => {
303 notification.classList.remove('show');
304 setTimeout(() => notification.remove(), 300);
305 }, 3000);
306 }
307
308 // 解析输入数据
309 function parseInputData() {

Callers 5

main.jsFile · 0.70
generateChartFunction · 0.70
exportChartFunction · 0.70
copyChartToClipboardFunction · 0.70
legacyCopyToClipboardFunction · 0.70

Calls 3

setTimeoutFunction · 0.85
removeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected