Update moduleraid.js - Esse commit faz que o whatsapp-web.js funcione #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/* moduleRaid v5
const moduleRaid = function () {
moduleRaid.mID = Math.random().toString(36).substring(7);
moduleRaid.mObj = {};
fillModuleArray = function() {
if (parseFloat(window.Debug.VERSION) < 2.3) {
(window.webpackChunkbuild || window.webpackChunkwhatsapp_web_client).push([
[moduleRaid.mID], {}, function(e) {
Object.keys(e.m).forEach(function(mod) {
moduleRaid.mObj[mod] = e(mod);
})
}
]);
} else {
let modules = self.require('__debug').modulesMap;
Object.keys(modules).filter(e => e.includes("WA")).forEach(function (mod) {
let modulos = modules[mod];
if (modulos) {
moduleRaid.mObj[mod] = {
default: modulos.defaultExport,
factory: modulos.factory,
...modulos
};
if (Object.keys(moduleRaid.mObj[mod].default).length == 0) {
try {
self.ErrorGuard.skipGuardGlobal(true);
Object.assign(moduleRaid.mObj[mod], self.importNamespace(mod));
} catch (e) {
}
}
}
})
}
}
fillModuleArray();
get = function get (id) {
return moduleRaid.mObj[id]
}
findModule = function findModule (query) {
results = [];
modules = Object.keys(moduleRaid.mObj);
}
return {
modules: moduleRaid.mObj,
constructors: moduleRaid.cArr,
findModule: findModule,
get: get
}
}
if (typeof module === 'object' && module.exports) {
module.exports = moduleRaid;
} else {
window.mR = moduleRaid();
}