Skip to content

Commit f011156

Browse files
committed
⚡️ provide more visual feedback when triggering CVEs
1 parent 7964d2b commit f011156

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

security/site/main.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,13 @@ const qsVersion = qs.get(VERSION);
7979
const qsPatched = qs.get(PATCHED);
8080

8181
if(qsVersion) {
82+
8283
selVersion.value = qsVersion;
8384
chkPatched.checked = qsPatched === 'true';
85+
86+
// clear out query string
87+
window.history.pushState({}, "", document.location.href.split("?")[0]);
88+
8489
}
8590
else {
8691

@@ -181,6 +186,10 @@ function updateCVE(cve) {
181186
$footerNote.text(`(but v${v} is not vulnerable to this CVE)`);
182187
}
183188
}
189+
190+
$relevantCVEFooter.addClass('flash');
191+
setTimeout(() => $relevantCVEFooter.removeClass('flash'), 500);
192+
184193
}
185194

186195
function CVE_2011_4969(cve){

security/site/styles.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,13 @@ input[type="checkbox"] {
148148
.hide {
149149
display: none;
150150
}
151+
152+
@keyframes flashy {
153+
from { background: var(--blue); }
154+
to { background: default; }
155+
}
156+
157+
.flash {
158+
animation-duration: 0.5s;
159+
animation-name: flashy;
160+
}

0 commit comments

Comments
 (0)