Browse Source

Smol js fix (fuck html attribute names)

main
Nicolai Ort 3 weeks ago
parent
commit
371e74ebb4
Signed by: niggl GPG Key ID: 13AFA55AF62F269F
  1. 10
      src/main.js

10
src/main.js

@ -26,8 +26,8 @@ function createUrl() {
let shorturl = {
target: document.getElementById("target").value,
shortcode: document.getElementById("shortcode").value,
no_preview: document.getElementById("bot_toggle").value,
clientside: document.getElementById("clientside_toggle").value
no_preview: document.getElementById("bot_toggle").checked,
clientside: document.getElementById("clientside_toggle").checked
};
if (shorturl.shortcode == "" | !shorturl.shortcode) {
@ -55,6 +55,8 @@ function createUrl() {
document.getElementById("clientside_container").classList.add("hidden");
document.getElementById("create").classList.add("hidden");
document.getElementById("reset").classList.remove("hidden");
document.getElementById("bot_toggle").checked = false;
document.getElementById("clientside_toggle").checked = false;
});
}
});
@ -99,9 +101,9 @@ function reset() {
document.getElementById("target_container").className = "";
document.getElementById("shortcode_container").className = "";
document.getElementById("bot_container").classList.remove("hidden");
document.getElementById("bot_container").value=false;
document.getElementById("bot_container").value = false;
document.getElementById("clientside_container").classList.remove("hidden");
document.getElementById("clientside_container").value=false;
document.getElementById("clientside_container").value = false;
document.getElementById("create").classList.remove("hidden");
});
}
Loading…
Cancel
Save