check if main page
This commit is contained in:
parent
918df9d2df
commit
9d09389203
10
main.js
10
main.js
@ -103,6 +103,11 @@
|
|||||||
document.head.appendChild(css)
|
document.head.appendChild(css)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isMainPage() {
|
||||||
|
let params = new URLSearchParams(document.location.search)
|
||||||
|
return params.get("action") !== "edit"
|
||||||
|
}
|
||||||
|
|
||||||
async function sendData(formData) {
|
async function sendData(formData) {
|
||||||
return await fetch(`https://runcity.geo.rictum.ru/api/competitions/${window.location.pathname.split('/')[1]}/update`, {
|
return await fetch(`https://runcity.geo.rictum.ru/api/competitions/${window.location.pathname.split('/')[1]}/update`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -1021,6 +1026,11 @@
|
|||||||
addCss('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css')
|
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")
|
addCss("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css")
|
||||||
|
|
||||||
|
|
||||||
|
if (isMainPage()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
/* NEW DEFALUT VALUES */
|
/* NEW DEFALUT VALUES */
|
||||||
|
|
||||||
document.querySelector(`#props input[name="new_file_type1"][value="l"]`).click()
|
document.querySelector(`#props input[name="new_file_type1"][value="l"]`).click()
|
||||||
|
Loading…
Reference in New Issue
Block a user