Compare commits
No commits in common. "f5b220b3e03257c19a28ab6e89c32cccff78b351" and "1f3e453f9e813271942de5bf65b50098842610ac" have entirely different histories.
f5b220b3e0
...
1f3e453f9e
@ -1,10 +1,4 @@
|
|||||||
<!--
|
<!DOCTYPE>
|
||||||
bookmark this with ?audio=file.wav&time=1h32m21s&style=font-color:green; on the end
|
|
||||||
to default the audio to file.wav, the time to 1h21m21s, and the style to font-color:green. get it? 0 or more of those 3.
|
|
||||||
hopefully your browser allows autoplay.
|
|
||||||
default finish sound is secret-area.wav
|
|
||||||
-->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -189,33 +183,33 @@ default finish sound is secret-area.wav
|
|||||||
return decodeURIComponent(match[1]);
|
return decodeURIComponent(match[1]);
|
||||||
}
|
}
|
||||||
function dropHandler(ev){
|
function dropHandler(ev){
|
||||||
console.log("Drop handler");
|
console.log("Drop handler");
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const files = [...ev.dataTransfer.items]
|
const files = [...ev.dataTransfer.items]
|
||||||
.map((item) => item.getAsFile())
|
.map((item) => item.getAsFile())
|
||||||
.filter((file) => file);
|
.filter((file) => file);
|
||||||
console.log(files);
|
console.log(files);
|
||||||
finishSound.querySelector("source").src=files[0].name;
|
finishSound.querySelector("source").src=files[0].name;
|
||||||
finishSound.load();
|
finishSound.load();
|
||||||
}
|
}
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
let onloadTime = getGET("time");
|
let onloadTime = getGET("time");
|
||||||
if(onloadTime !== null){
|
if(onloadTime !== null){
|
||||||
timeinput.value = onloadTime;
|
timeinput.value = onloadTime;
|
||||||
finishTime = Temporal.Now.instant().add(Temporal.Duration.from("PT" + timeinput.value));
|
finishTime = Temporal.Now.instant().add(Temporal.Duration.from("PT" + timeinput.value));
|
||||||
hz();
|
hz();
|
||||||
}
|
}
|
||||||
|
|
||||||
let onloadFile = getGET("audio");
|
let onloadFile = getGET("audio");
|
||||||
if(onloadFile !== null){
|
if(onloadFile !== null){
|
||||||
finishSound.querySelector("source").src=onloadFile ;
|
finishSound.querySelector("source").src=onloadFile ;
|
||||||
finishSound.load();
|
finishSound.load();
|
||||||
}
|
}
|
||||||
let onloadStyle = getGET("style");
|
let onloadStyle = getGET("style");
|
||||||
if(onloadStyle !== null){
|
if(onloadStyle !== null){
|
||||||
styling.value = onloadStyle;
|
styling.value = onloadStyle;
|
||||||
timeroutput.style = styling.value;
|
timeroutput.style = styling.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
dropZone.addEventListener("drop", dropHandler);
|
dropZone.addEventListener("drop", dropHandler);
|
||||||
|
|
||||||
@ -225,7 +219,7 @@ default finish sound is secret-area.wav
|
|||||||
finishSound.load();
|
finishSound.load();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user