web/shell -> shell/

This commit is contained in:
kichikuou
2017-03-25 13:31:02 +09:00
parent 51b5280d61
commit d829fa85d5
12 changed files with 1 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
class FallbackTextDecoder {
constructor(utfLabel?: string) {}
decode(buffer: DataView): string {
let out = '';
for (let i = 0; i < buffer.byteLength; i++) {
let c = buffer.getUint8(i);
if (c < 128)
out += String.fromCharCode(c);
else
out += '%' + c.toString(16);
}
return out;
}
}
if (!(<any>window).TextDecoder)
(<any>window).TextDecoder = <TextEncoding.TextDecoderStatic>FallbackTextDecoder;