Files
jszip/🎬.js

73 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const АДРЕС_АРХИВА = "https://git.opengamestudio.org/kornerr/nPOBEPuTb-JSZip-PEC/raw/branch/master/zip_TEMA_M1K.zip";
// // // //
ИзучитьАрхив = мир =>
{
мир.архив.file("zip_TEMA_M1K/0000").async("string").then(function(содержимое) {
document.body.innerHTML += `<pre>${содержимое}</pre>`;
});
};
// // // //
РазобратьАрхив = мир =>
{
var zip = new JSZip();
zip.loadAsync(мир.архив).then(function(архив) {
мир.архив = архив;
мир.уведомить("разобрали архив");
});
};
// // // //
СкачатьАрхив = мир =>
{
мир.взять(
АДРЕС_АРХИВА,
function(архив) {
мир.архив = архив;
мир.уведомить("скачали архив");
},
function(ошибка) {
console.error("ОШИБКА:", ошибка);
},
true
);
};
// // // //
СкрытьКрутилку = мир =>
{
document.getElementById("крутилка").style.display = "none";
};
// // // //
ЗадатьЗаголовок = мир =>
{
document.title = "Проверить JSZip";
};
// // // //
УстановитьJSZip = мир =>
{
var м = мир.модули.модульПоУказателю(УКАЗАТЕЛЬТОГО_МОДУЛЯ);
var содержимое = м.содержимое["/jszip.min.js"];
eval(содержимое);
};