mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Remove compression cache feature
Some checks failed
Make Latest Folder On EmulatorJS CDN / run (push) Has been cancelled
Some checks failed
Make Latest Folder On EmulatorJS CDN / run (push) Has been cancelled
This commit is contained in:
parent
588a5e2beb
commit
685f3ebfef
1 changed files with 0 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
class EJS_COMPRESSION {
|
||||
cache = {};
|
||||
constructor(EJS) {
|
||||
this.EJS = EJS;
|
||||
}
|
||||
|
@ -37,16 +36,12 @@ class EJS_COMPRESSION {
|
|||
path = "compression/libunrar.js";
|
||||
obj = "rar";
|
||||
}
|
||||
if (this.cache[obj]) {
|
||||
return this.cache[obj];
|
||||
}
|
||||
this.EJS.downloadFile(path, (res) => {
|
||||
if (res === -1) {
|
||||
this.EJS.startGameError(this.EJS.localization('Network Error'));
|
||||
return;
|
||||
}
|
||||
if (method === "rar") {
|
||||
// Do not cache rar. This shouldnt normally be used more than once anyways.
|
||||
this.EJS.downloadFile("compression/libunrar.wasm", (res2) => {
|
||||
if (res2 === -1) {
|
||||
this.EJS.startGameError(this.EJS.localization('Network Error'));
|
||||
|
@ -63,7 +58,6 @@ class EJS_COMPRESSION {
|
|||
const blob = new Blob([res.data], {
|
||||
type: 'application/javascript'
|
||||
})
|
||||
this.cache[obj] = blob;
|
||||
resolve(blob);
|
||||
}
|
||||
}, null, false, {responseType: "arraybuffer", method: "GET"});
|
||||
|
|
Loading…
Reference in a new issue