server ver

This commit is contained in:
w0bm
2022-06-20 16:45:36 +00:00
parent addc1309c1
commit 0a6492baa2
5 changed files with 28 additions and 9 deletions

View File

@@ -1422,9 +1422,11 @@ function draw( video, thecanvas, img ){
// Vielen Dank an Flummi!
// This code snippet makes full and valid urls clickable in the info box!
const infoboxContent = document.querySelector("button#infobox");
if(infoboxContent)
infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/(https?:\/\/[^\s]+)/g, "<a href='$1' target='_blank' rel='extern'>$1</a>");
//const infoboxContent = document.querySelector("button#infobox");
//if(infoboxContent)
// infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/(https?:\/\/[^\s]+)/g, "<a href='$1' target='_blank' rel='extern'>$1</a>");
// uncommenting this because of problematic replacement and possible abuse
//This was supposed to work for urls that are not in a correct url-sheme such as z0r.de/1337 but ehm itz out of biz cuz uhm xD https://f0ck.it/uploads/%5B2019%5D_firefox_YapokIcyShoveler.png
//infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)?/gi, "<a href='$1'>$1</a>");