From d0a7af2dca3ed0a2bc0b99a6f96b29def310a903 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Thu, 10 Apr 2025 14:53:30 +0200 Subject: [PATCH] Finalizza la parte urbana START --- ertpl.js | 11 +++++++++-- starturbano.html | 15 ++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ertpl.js b/ertpl.js index 309aefe..f925452 100644 --- a/ertpl.js +++ b/ertpl.js @@ -1,8 +1,15 @@ /* The function below is used to fall back to the second (not for importance) server if the first is not available Swaps both links and images sources +aid = identifier for the anchor (a tag) +imgid = identifier for the image (img tag) +path = path for the image starting from the root, for example /Dani/10225.jpg */ function changeUrlToFallback(aid,imgid,path) { - document.getElementById(aid).href = "http://serverissimo.freeddns.org:30081/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=" + path + "&x=1920&y=1080&a=true"; - document.getElementById(imgid).src = "http://serverissimo.freeddns.org:30081/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=" + path + "&x=1920&y=1080&a=true"; + try { + document.getElementById(imgid).src = "http://serverissimo.freeddns.org:30081/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=" + path + "&x=1920&y=1080&a=true"; + } catch {} + try { + document.getElementById(aid).href = "http://serverissimo.freeddns.org:30081/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=" + path + "&x=1920&y=1080&a=true"; + } catch {} } \ No newline at end of file diff --git a/starturbano.html b/starturbano.html index 0546d92..2774358 100644 --- a/starturbano.html +++ b/starturbano.html @@ -11,6 +11,7 @@ +