add fullscreen for route_mgmt

This commit is contained in:
Zhora Shalyapin 2025-03-10 10:11:55 +00:00
parent af84552e32
commit 0408afd554

90
main.js
View File

@ -4,7 +4,7 @@
// @version 2024-11-18 // @version 2024-11-18
// @desc try to take over the world! // @desc try to take over the world!
// @author You // @author You
// @match https://rst.runcity.org/*/cp_mgmt* // @match https://rst.runcity.org/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=runcity.org // @icon https://www.google.com/s2/favicons?sz=64&domain=runcity.org
// @grant none // @grant none
// @require https://code.jquery.com/jquery-3.7.1.min.js // @require https://code.jquery.com/jquery-3.7.1.min.js
@ -758,10 +758,12 @@
function addFullscreenButton() { function addFullscreenButton() {
$(async () => { $(async () => {
if (document.querySelector("#map") !== null) {
while (L.Control.Fullscreen === undefined) { while (L.Control.Fullscreen === undefined) {
await sleep(500) await sleep(500)
} }
map.addControl(new L.Control.Fullscreen()) map.addControl(new L.Control.Fullscreen())
}
}) })
} }
@ -776,57 +778,85 @@
#content-wrapper { #content-wrapper {
display: flex; display: flex;
gap: 20px; gap: 20px;
}
#props { #props {
width: unset !important; width: unset !important;
} }
#content-wrapper form { form {
width: 50%; width: 50%;
} }
#content-wrapper #map-wrapper { #map-wrapper {
width: 50%; width: 50%;
} }
#content-wrapper #map { #map {
width: unset !important; width: unset !important;
} }
#new { #new {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
}
#new > :not(:first-child) { & > :not(:first-child) {
padding-top: 5px; padding-top: 5px;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
#new > :not(:last-child) { & > :not(:last-child) {
padding-bottom: 5px; padding-bottom: 5px;
} }
#cps_main { .map-icon {
width: 150px;
}
#new .map-icon {
width: 15px; width: 15px;
height: 15px; height: 15px;
} }
#new .copy-button { .copy-button {
all: unset; all: unset;
cursor: pointer; cursor: pointer;
} }
#new .copy-button img { .copy-button img {
width: 15px; width: 15px;
heigth: 15px; heigth: 15px;
} }
input[type=radio], input[type=checkbox] {
margin: 0;
}
input[type="file"] {
display: none;
}
div > input[type="checkbox"] {
display: flex;
align-items: center;
}
input#cp_number {
width: 3em;
}
select#cps_main {
width: 6em;
}
input:is(#lat, #lng) {
width: 5.5em;
}
input[name="cp[name_int]"] {
width: 34em;
}
}
#cps_main {
width: 150px;
}
input[type=submit] { input[type=submit] {
width: fit-content; width: fit-content;
} }
@ -846,19 +876,6 @@
cursor: pointer; cursor: pointer;
} }
#new input[type=radio], input[type=checkbox] {
margin: 0;
}
#new input[type="file"] {
display: none;
}
#new div > input[type="checkbox"] {
display: flex;
align-items: center;
}
.buttons-row__content-wrapper { .buttons-row__content-wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -866,22 +883,6 @@
font-weight: normal; font-weight: normal;
} }
#new input#cp_number {
width: 3em;
}
#new select#cps_main {
width: 6em;
}
#new input:is(#lat, #lng) {
width: 5.5em;
}
#new input[name="cp[name_int]"] {
width: 34em;
}
.custom-file-upload { .custom-file-upload {
display: block; display: block;
width: fit-content; width: fit-content;
@ -1096,6 +1097,7 @@
align-items: center; align-items: center;
gap: 5px; gap: 5px;
} }
}
` `
/* REDIRECTS */ /* REDIRECTS */