From 040b3d932e246e77286b3980fcefd25ac1340230 Mon Sep 17 00:00:00 2001 From: Curry141 <135717077+Daniongithub@users.noreply.github.com> Date: Sat, 17 May 2025 16:51:00 +0200 Subject: [PATCH] Update linkgen tool --- admin/dani/linkgen/linkgen.html | 4 +++- admin/dani/linkgen/linkgen.js | 15 +++++++++++++-- admin/dani/linkgen/notrue.html | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/admin/dani/linkgen/linkgen.html b/admin/dani/linkgen/linkgen.html index 407287b..576ab13 100644 --- a/admin/dani/linkgen/linkgen.html +++ b/admin/dani/linkgen/linkgen.html @@ -12,11 +12,13 @@ Generatore <img>

Inserisci matricola:

+

Inserisci numero se hai altre foto con stessa matricola (default: 1):

+

Inserisci link share:

- +
\ No newline at end of file diff --git a/admin/dani/linkgen/linkgen.js b/admin/dani/linkgen/linkgen.js index 47c73a9..0e943a0 100644 --- a/admin/dani/linkgen/linkgen.js +++ b/admin/dani/linkgen/linkgen.js @@ -1,5 +1,6 @@ function generatd() { const matricola = document.getElementById("matricola").value.trim(); + var numero = document.getElementById("numero").value.trim(); const link = document.getElementById("link").value.trim(); if (!matricola || !link) { @@ -16,8 +17,12 @@ function generatd() { alert("Parametro ?file= mancante nell'URL."); return; } + + if (numero === "") { + numero = 1; + } - const htmlString = `Server foto non raggiungibile.`; + const htmlString = `Server foto non raggiungibile.`; const escapedOutput = htmlString .replace(/&/g, "&") @@ -73,8 +78,14 @@ function copiaOutput() { }); } -function pulisci() { +function puliscitd() { document.getElementById("matricola").value = ""; document.getElementById("link").value = ""; document.getElementById("output").innerHTML = ""; } + +function pulisciimg() { + document.getElementById("mezzo").value = ""; + document.getElementById("link").value = ""; + document.getElementById("output").innerHTML = ""; +} \ No newline at end of file diff --git a/admin/dani/linkgen/notrue.html b/admin/dani/linkgen/notrue.html index 99766d4..f58ca2d 100644 --- a/admin/dani/linkgen/notrue.html +++ b/admin/dani/linkgen/notrue.html @@ -9,14 +9,14 @@

Generatore di <img> per ER-TPL

- Generatore <td> + Generatore <td>

Inserisci nome mezzo html:

Inserisci link share:

- +
\ No newline at end of file