Add links for non-tls URLs, too
This commit is contained in:
parent
9b48d1c782
commit
52a2ce3838
2
main.js
2
main.js
|
@ -140,7 +140,7 @@ function objectToTable(o) {
|
||||||
if (typeof value === "object") {
|
if (typeof value === "object") {
|
||||||
value = objectToTable(value);
|
value = objectToTable(value);
|
||||||
}
|
}
|
||||||
if (typeof value === "string" && value.startsWith('https://')) {
|
if (typeof value === "string" && /^https?:\/\//.test(value)) {
|
||||||
value = `<a href="${value}">${value}</a>`
|
value = `<a href="${value}">${value}</a>`
|
||||||
}
|
}
|
||||||
table += `<tr><td style="border: 1px solid;">${key}</td><td style="border: 1px solid;">${value}</td></tr>`;
|
table += `<tr><td style="border: 1px solid;">${key}</td><td style="border: 1px solid;">${value}</td></tr>`;
|
||||||
|
|
Loading…
Reference in a new issue