mirror of
https://github.com/0xMarcio/cve.git
synced 2025-06-19 17:30:12 +00:00
Update Mon May 27 02:42:49 CEST 2024
This commit is contained in:
parent
266c00057c
commit
9c41a22562
@ -23,9 +23,36 @@ function convertLinksToList(links) {
|
|||||||
if (links.length === 0) {
|
if (links.length === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `<hr><ul>${links.map(link => `<li><a target="_blank" href="${link}">${link}</a></li>`).join('')}</ul>`;
|
let htmlOutput = `<hr><div class="poc-container"><ul>`;
|
||||||
|
const displayLimit = 5;
|
||||||
|
links.slice(0, displayLimit).forEach(link => {
|
||||||
|
htmlOutput += `<li><a target="_blank" href="${link}">${link}</a></li>`;
|
||||||
|
});
|
||||||
|
htmlOutput += `</ul>`;
|
||||||
|
if (links.length > displayLimit) {
|
||||||
|
htmlOutput += `
|
||||||
|
<ul class="dropdown" style="display:none;">
|
||||||
|
${links.slice(displayLimit).map(link => `<li><a target="_blank" href="${link}">${link}</a></li>`).join('')}
|
||||||
|
</ul>
|
||||||
|
<button class="dropdown-btn" onclick="toggleDropdown(this)">Show More</button>`;
|
||||||
|
}
|
||||||
|
htmlOutput += `</div>`;
|
||||||
|
return htmlOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleDropdown(button) {
|
||||||
|
const dropdown = button.previousElementSibling;
|
||||||
|
if (dropdown.style.display === "none") {
|
||||||
|
dropdown.style.display = "block";
|
||||||
|
button.textContent = "Show Less";
|
||||||
|
} else {
|
||||||
|
dropdown.style.display = "none";
|
||||||
|
button.textContent = "Show More";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getCveLink(cveId) {
|
function getCveLink(cveId) {
|
||||||
return `<a target="_blank" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=${cveId}"><b>${cveId}</b></a>`;
|
return `<a target="_blank" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=${cveId}"><b>${cveId}</b></a>`;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@import url("https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap");
|
@import url("https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap");
|
||||||
body {
|
body {
|
||||||
|
font-family: 'Source Code Pro', monospace;
|
||||||
background: black;
|
background: black;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@ -182,3 +183,21 @@ hr {
|
|||||||
.cveNum {
|
.cveNum {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
}
|
}
|
||||||
|
.poc-container {
|
||||||
|
position: relative;
|
||||||
|
padding-right: 100px; /* Adjust this value if needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-btn {
|
||||||
|
border: none;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
outline: none;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #222;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: .5rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user