Created
November 4, 2019 04:41
-
-
Save Ebycow/5e9c002affdc27006b731577426a8eb8 to your computer and use it in GitHub Desktop.
棒読みちゃんのSE簡易生成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>sound</title> | |
</head> | |
<body> | |
<div id="drop" style="width:800px; height:100px; padding:10px; border:1px dashed" | |
ondragover="onDragOver(event)" >ko↑ko↓</div> | |
<hr> | |
<div style="margin:10px; white-space: pre;" id="disp" ></div> | |
<hr> | |
<pre style="margin:10px; height:2px;" id="disp2" ></pre> | |
<script type="text/javascript"> | |
var reg=/(.*)(?:\.([^.]+$))/; | |
document.getElementById("drop").addEventListener("drop", onDrop, false); | |
function onDrop(event) { | |
var files = event.dataTransfer.files; | |
var disp = document.getElementById("disp"); | |
disp.innerHTML = ""; | |
for (var i = 0; i < files.length; i++) { | |
var f = files[i]; | |
disp.innerHTML += f.name.match(reg)[1].length + "\tN\t" + f.name.match(reg)[1] + "\t(SoundW " + f.name + ")<br />"; | |
disp2.innerHTML += f.name.match(reg)[1] + "<br />"; | |
} | |
event.preventDefault(); | |
} | |
function onDragOver(event) { | |
event.preventDefault(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment