34 lines
949 B
JavaScript
34 lines
949 B
JavaScript
"use strict";
|
|
mimicry.module([
|
|
"terminalModule",
|
|
"simple", Mimicry.Type.json,
|
|
"background", Mimicry.Type.css,
|
|
"text", Mimicry.Type.text,
|
|
"binary", Mimicry.Type.binary,
|
|
"inner/inner"
|
|
], function (global, [terminalModule, simple, background, text, binary, inner]) {
|
|
let bnr = false;
|
|
if (binary instanceof ArrayBuffer) {
|
|
const view = new Uint8Array(binary);
|
|
if (
|
|
view.length === 32 &&
|
|
view[0] === 0 &&
|
|
view[1] === 1 &&
|
|
view[3] === 3 &&
|
|
view[31] === 0x11 &&
|
|
view[30] === 0x10 &&
|
|
view[10] === 0x6e &&
|
|
view[12] === 0x72 &&
|
|
view[21] === 0x74
|
|
) {
|
|
bnr = true;
|
|
}
|
|
}
|
|
return [
|
|
terminalModule === "terminal",
|
|
simple.a[4] === 115,
|
|
text === "Lorem ipsum, I guess",
|
|
bnr,
|
|
inner === true
|
|
];
|
|
}); |