Add search params to x2t.wasm to prevent caching
https://github.com/cryptpad/cryptpad/issues/1278
This commit is contained in:
parent
16115de950
commit
c7f9474325
1 changed files with 14 additions and 0 deletions
|
@ -31,6 +31,20 @@ if (!Module) /** @suppress{checkTypes}*/Module = typeof Module !== 'undefined' ?
|
|||
// refer to Module (if they choose; they can also define Module)
|
||||
Module.noInitialRun = true;
|
||||
Module.noExitRuntime = true;
|
||||
(function() {
|
||||
let suffix;
|
||||
if (typeof document != 'undefined') {
|
||||
const myScript = document.currentScript;
|
||||
const mySrc = myScript.getAttribute('src');
|
||||
suffix = new URL(mySrc).search;
|
||||
} else {
|
||||
suffix = '';
|
||||
}
|
||||
|
||||
Module.locateFile = function(path, prefix) {
|
||||
return prefix + path + suffix;
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
// Sometimes an existing Module object exists with properties
|
||||
|
|
Loading…
Reference in a new issue