About upcoming theme

mhm
15 Replies
Emma
Emma2y ago
mhm
Owen
Owen2y ago
mhm
Flame
FlameOP2y ago
hmmm no luck rn :/ however, the one option you suggested, https://discord.com/channels/1063548024825057451/1125466591128195242/1151202761245982841 can and does work
Emma
Emma2y ago
No description
Flame
FlameOP2y ago
yeah you don't even need jquery for it just a simple document.querySelector("a:not([blueprint])[href='/account']").click() the css selector a:not([blueprint])[href='/account'] breakdown - - selects <a> element - which doesn't have blueprint attribute set. (-> to exclude original blueprint sidebar links) - which has attribute href set to /account (you can change this depending on the path) - finds correct /account link from page and gives it back to js and the .click() function simulates a click
Emma
Emma2y ago
It works perfectly. Thank you Flame.
Flame
FlameOP2y ago
👍
Emma
Emma2y ago
aight so i will have a lot of options in nebula's admin page and only want one save button so my idea is is there a way to check if there are any changes to a html form and then show an overlay with a save button similar to how discord does it
Flame
FlameOP2y ago
hmmmmmmmm you bru-
Emma
Emma2y ago
got it already
Flame
FlameOP2y ago
👍 I typed it half and then forgot to reply ;/ I was gonna say that you will need some kind of library to do that i think or you can loop through all fields and check if their values are changed
Emma
Emma2y ago
<script>
document.addEventListener("DOMContentLoaded", function () {
const configForm = document.getElementById("config-form");
const saveOverlay = document.getElementById("save-overlay");

configForm.addEventListener("change", function () {
formHasChanges = true;
saveOverlay.style.display = "inline";
setTimeout(() => {
saveOverlay.style.bottom = "10px";
}, 100)
});
});
</script>
<script>
document.addEventListener("DOMContentLoaded", function () {
const configForm = document.getElementById("config-form");
const saveOverlay = document.getElementById("save-overlay");

configForm.addEventListener("change", function () {
formHasChanges = true;
saveOverlay.style.display = "inline";
setTimeout(() => {
saveOverlay.style.bottom = "10px";
}, 100)
});
});
</script>
well not exactly
Flame
FlameOP2y ago
oh, well that was easy lol nice 👍
Emma
Emma2y ago
lmao

Did you find this page helpful?