minor fix to bypass.city linkifier

This commit is contained in:
Amm0ni4 2024-02-26 00:33:26 +01:00
parent 2970c5fc0e
commit 9fe2abf79c
2 changed files with 2 additions and 2 deletions

View file

@ -1785,7 +1785,7 @@
function makeUrlClickable(element) { function makeUrlClickable(element) {
let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; let url = element.textContent.match(/(https?:\/\/\S+)/)[0];
if (url && isValidUrl(url)) { if (url && isValidUrl(url) && !url.endsWith('...')) {
let link = document.createElement('a'); link.href = url; link.textContent = url; let link = document.createElement('a'); link.href = url; link.textContent = url;
element.innerHTML = element.innerHTML.replace(url, link.outerHTML); element.innerHTML = element.innerHTML.replace(url, link.outerHTML);
return url; return url;

View file

@ -13,7 +13,7 @@
function makeUrlClickable(element) { function makeUrlClickable(element) {
let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; let url = element.textContent.match(/(https?:\/\/\S+)/)[0];
if (url && isValidUrl(url)) { if (url && isValidUrl(url) && !url.endsWith('...')) {
let link = document.createElement('a'); link.href = url; link.textContent = url; let link = document.createElement('a'); link.href = url; link.textContent = url;
element.innerHTML = element.innerHTML.replace(url, link.outerHTML); element.innerHTML = element.innerHTML.replace(url, link.outerHTML);
return url; return url;