From 721ce41579743be18071a0b19ad1f8d62c9b4101 Mon Sep 17 00:00:00 2001 From: nworr <43475951+nworr@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:06:13 +0200 Subject: [PATCH] Count user defined js , adapt message when js exception (#4776) * count user defined js and check if user is admin * check user defined script and adapt message on js exception * add no_user_defined_js=1 to url disable user script * add repoAdminLink to lizUrls --- assets/src/legacy/map.js | 10 ++++++++-- lizmap/modules/view/controllers/lizAjax.classic.php | 3 +++ lizmap/modules/view/controllers/lizMap.classic.php | 8 +++++++- .../view/locales/en_US/dictionnary.UTF-8.properties | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/assets/src/legacy/map.js b/assets/src/legacy/map.js index 17879c4108..7ef6400289 100644 --- a/assets/src/legacy/map.js +++ b/assets/src/legacy/map.js @@ -3914,9 +3914,15 @@ window.lizMap = function() { }) .catch((error) => { console.error(error); - const errorMsg = ` + let errorMsg = `
${lizDict['startup.error']}
-
${lizDict['startup.goToProject']}