added picture logic & started on upload button

This commit is contained in:
2025-01-22 22:30:58 +01:00
parent 9f2ed4e448
commit 11db41a128
7 changed files with 18 additions and 7 deletions
+11 -1
View File
@@ -46,10 +46,16 @@ function setSillyValue(value) {
`;
}
function setPictureValue() {
const picInput = document.getElementById("picInput")
const picValue = document.getElementById("picValue")
function setPictureValue() {
let src = picInput.value != "custom" ? `/assets/boykissers/${picInput.value}.png` : ""
picValue.src = src
}
picInput.oninput = function() { setPictureValue() }
function prependZero(number) {
return number < 10 ? "0" + number : number;
}
@@ -67,4 +73,8 @@ function onLoadLicense() {
if (sillyInput) {
setSillyValue(sillyInput.value);
}
if (picInput) {
setPictureValue()
}
}