diff --git a/admin/dani/servizi.html b/admin/dani/servizi.html new file mode 100644 index 0000000..db844a9 --- /dev/null +++ b/admin/dani/servizi.html @@ -0,0 +1,17 @@ + + + + + + Admin Space + + + + + + +

Pagina dei servizi del Dani

+

Complimenti! Se hai trovato questa pagina sei davvero un grande smanettone.
Tranquillo, qui non troverai segreti statali e mai ci saranno.

+ Generatore <td> + + \ No newline at end of file diff --git a/admin/dani/tdgenerator/index.html b/admin/dani/tdgenerator/index.html new file mode 100644 index 0000000..85a65a6 --- /dev/null +++ b/admin/dani/tdgenerator/index.html @@ -0,0 +1,21 @@ + + + + + + Generatore <td> + + + + +

Generatore di <td> per ER-TPL

+

Inserisci matricola:

+ +

Inserisci link share:

+ + + + +
+ + \ No newline at end of file diff --git a/admin/dani/tdgenerator/linkgen.js b/admin/dani/tdgenerator/linkgen.js new file mode 100644 index 0000000..011b58c --- /dev/null +++ b/admin/dani/tdgenerator/linkgen.js @@ -0,0 +1,47 @@ +function genera() { + const matricola = document.getElementById("matricola").value.trim(); + const link = document.getElementById("link").value.trim(); + + if (!matricola || !link) { + alert("Compila entrambi i campi."); + return; + } + + try { + const urlObj = new URL(link); + const params = new URLSearchParams(urlObj.search); + const path = params.get("file"); + + if (!path) { + alert("Parametro ?file= mancante nell'URL."); + return; + } + + const htmlString = `Server foto non raggiungibile.`; + + const escapedOutput = htmlString + .replace(/&/g, "&") + .replace(//g, ">"); + + document.getElementById("output").innerHTML = escapedOutput; + + } catch (error) { + alert("URL non valido."); + } +} + +function copiaOutput() { + const code = document.getElementById("output").innerText; + navigator.clipboard.writeText(code).then(() => { + //alert("Codice copiato negli appunti!"); + }).catch(() => { + alert("Errore durante la copia."); + }); +} + +function pulisci() { + document.getElementById("matricola").value = ""; + document.getElementById("link").value = ""; + document.getElementById("output").innerHTML = ""; +} diff --git a/admin/dani/tdgenerator/style.css b/admin/dani/tdgenerator/style.css new file mode 100644 index 0000000..a418fa9 --- /dev/null +++ b/admin/dani/tdgenerator/style.css @@ -0,0 +1,4 @@ +body{ + text-align: center; + font-family: Consolas; +} \ No newline at end of file