diff --git a/main.js b/main.js index d174d35..a8b8f23 100644 --- a/main.js +++ b/main.js @@ -102,6 +102,11 @@ css.rel = "stylesheet" document.head.appendChild(css) } + + function isMainPage() { + let params = new URLSearchParams(document.location.search) + return params.get("action") !== "edit" + } async function sendData(formData) { return await fetch(`https://runcity.geo.rictum.ru/api/competitions/${window.location.pathname.split('/')[1]}/update`, { @@ -1021,6 +1026,11 @@ addCss('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css') addCss("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css") + + if (isMainPage()) { + return + } + /* NEW DEFALUT VALUES */ document.querySelector(`#props input[name="new_file_type1"][value="l"]`).click()