MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / showAlert

Method showAlert

assets/js/github_ui.js:59–75  ·  view source on GitHub ↗
(message, className)

Source from the content-addressed store, hash-verified

57 }
58
59 showAlert(message, className) {
60
61 this.clearAlertMessage();
62 const div = document.createElement('div');
63
64 div.className = className;
65
66 div.appendChild(document.createTextNode(message));
67
68 const container = document.querySelector('.searchContainer');
69
70 const search = document.querySelector('.search');
71
72 container.insertBefore(div, search);
73
74 setTimeout(this.clearAlertMessage, 3000);
75 }
76
77 clearAlertMessage() {
78 const currentAlert = document.querySelector('.alert');

Callers 1

github_app.jsFile · 0.80

Calls 1

clearAlertMessageMethod · 0.95

Tested by

no test coverage detected