-
Notifications
You must be signed in to change notification settings - Fork 2
/
savefile
44 lines (43 loc) · 1.2 KB
/
savefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input type="file" name="" id="test">
<img src="sort.gif">
<script type="text/javascript" src="gif.js"></script>
<script type="text/javascript" src="html.js"></script>
<script type="text/javascript">
var handler = {
hdr: function(e){console.log(e)},
// gce: function(e){console.log(e)},
// com: function(e){console.log(e)}, // I guess that's all for now.
app: {
// TODO: Is there much point in actually supporting iterations?
// NETSCAPE:function(e){console.log(e)}
},
img: function(e){console.log(e)},
eof: function(block) {
console.log(block,11)
//toolbar.style.display = '';
// pushFrame();
// doDecodeProgress(false);
// doText('Playing...');
// doPlay();
}
};
document.getElementById('test').addEventListener('change',function(e){
let fs = e.target.files[0]
let fr = new FileReader();
fr.onloadend = function(){
parseGIF(new Stream(fr.result),handler);
}
fr.readAsText(fs,'x-user-defined');
})
</script>
<script type="text/javascript">
// parseGif('')
</script>
</body>
</html>