Compare commits
2 Commits
1f3e453f9e
...
f5b220b3e0
| Author | SHA1 | Date | |
|---|---|---|---|
| f5b220b3e0 | |||
| 2f093109d5 |
@ -1,4 +1,10 @@
|
||||
<!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>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@ -183,33 +189,33 @@
|
||||
return decodeURIComponent(match[1]);
|
||||
}
|
||||
function dropHandler(ev){
|
||||
console.log("Drop handler");
|
||||
ev.preventDefault();
|
||||
const files = [...ev.dataTransfer.items]
|
||||
.map((item) => item.getAsFile())
|
||||
.filter((file) => file);
|
||||
console.log(files);
|
||||
finishSound.querySelector("source").src=files[0].name;
|
||||
finishSound.load();
|
||||
console.log("Drop handler");
|
||||
ev.preventDefault();
|
||||
const files = [...ev.dataTransfer.items]
|
||||
.map((item) => item.getAsFile())
|
||||
.filter((file) => file);
|
||||
console.log(files);
|
||||
finishSound.querySelector("source").src=files[0].name;
|
||||
finishSound.load();
|
||||
}
|
||||
window.onload = () => {
|
||||
let onloadTime = getGET("time");
|
||||
if(onloadTime !== null){
|
||||
let onloadTime = getGET("time");
|
||||
if(onloadTime !== null){
|
||||
timeinput.value = onloadTime;
|
||||
finishTime = Temporal.Now.instant().add(Temporal.Duration.from("PT" + timeinput.value));
|
||||
hz();
|
||||
}
|
||||
}
|
||||
|
||||
let onloadFile = getGET("audio");
|
||||
if(onloadFile !== null){
|
||||
finishSound.querySelector("source").src=onloadFile ;
|
||||
finishSound.load();
|
||||
if(onloadFile !== null){
|
||||
finishSound.querySelector("source").src=onloadFile ;
|
||||
finishSound.load();
|
||||
}
|
||||
let onloadStyle = getGET("style");
|
||||
if(onloadStyle !== null){
|
||||
styling.value = onloadStyle;
|
||||
if(onloadStyle !== null){
|
||||
styling.value = onloadStyle;
|
||||
timeroutput.style = styling.value;
|
||||
}
|
||||
}
|
||||
|
||||
dropZone.addEventListener("drop", dropHandler);
|
||||
|
||||
@ -219,7 +225,7 @@
|
||||
finishSound.load();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user