feat: add upstream and aur urls to package info modal

This commit is contained in:
2023-11-06 15:11:14 +02:00
parent deab8ddae6
commit 3f8b9eaed6
3 changed files with 25 additions and 1 deletions

View File

@ -79,6 +79,15 @@
.replace(/"/g, """);
}
// because I'm tired of safe element generation
function safeLink(url, text, title) {
const element = document.createElement("a");
element.href = url;
element.innerText = text;
if (title) element.title = title;
return element;
}
Date.prototype.toISOStringShort = function() {
const pad = number => String(number).padStart(2, "0");
return `${this.getFullYear()}-${pad(this.getMonth() + 1)}-${pad(this.getDate())} ${pad(this.getHours())}:${pad(this.getMinutes())}:${pad(this.getSeconds())}`;