Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!window.ST0RE) {
- (function () {
- function getStore(modules) {
- let foundCount = 0;
- let neededObjects = [
- { id: 'ST0RE', conditions: (module) => (module.default && module.default.Chat && module.default.Msg) ? module.default : null },
- { id: 'MediaCollection', conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },
- { id: 'MediaProcess', conditions: (module) => (module.BLOB) ? module : null },
- { id: 'Wap', conditions: (module) => (module.createGroup) ? module : null },
- { id: 'ServiceWorker', conditions: (module) => (module.default && module.default.killServiceWorker) ? module : null },
- { id: 'State', conditions: (module) => (module.STATE && module.STREAM) ? module : null },
- { id: 'WapDelete', conditions: (module) => (module.sendConversationDelete && module.sendConversationDelete.length == 2) ? module : null },
- { id: 'Conn', conditions: (module) => (module.default && module.default.ref && module.default.refTTL) ? module.default : null },
- { id: 'WapQuery', conditions: (module) => module.default && module.default.contactFindQuery && module.default.queryExist ? module.default : null },
- { id: 'CryptoLib', conditions: (module) => (module.decryptE2EMedia) ? module : null },
- { id: 'OpenChat', conditions: (module) => (module.default && module.default.prototype && module.default.prototype.openChat) ? module.default : null },
- { id: 'UserConstructor', conditions: (module) => (module.default && module.default.prototype && module.default.prototype.isServer && module.default.prototype.isUser) ? module.default : null },
- { id: 'SendTextMsgToChat', conditions: (module) => (module.sendTextMsgToChat) ? module.sendTextMsgToChat : null },
- { id: 'SendSeen', conditions: (module) => (module.sendSeen) ? module.sendSeen : null },
- { id: 'sendDelete', conditions: (module) => (module.sendDelete) ? module.sendDelete : null }
- ];
- for (let idx in modules) {
- if ((typeof modules[idx] === 'object') && (modules[idx] !== null)) {
- neededObjects.forEach((needObj) => {
- if (!needObj.conditions || needObj.foundedModule)
- return;
- let neededModule = needObj.conditions(modules[idx]);
- if (neededModule !== null) {
- foundCount++;
- needObj.foundedModule = neededModule;
- }
- });
- if (foundCount == neededObjects.length) {
- break;
- }
- }
- }
- let neededStore = neededObjects.find((needObj) => needObj.id === 'ST0RE');
- window.ST0RE = neededStore.foundedModule ? neededStore.foundedModule : {};
- neededObjects.splice(neededObjects.indexOf(neededStore), 1);
- neededObjects.forEach((needObj) => {
- if (needObj.foundedModule) {
- window.ST0RE[needObj.id] = needObj.foundedModule;
- }
- });
- window.ST0RE.Chat.modelClass.prototype.sendMessage = function (e) {
- window.ST0RE.SendTextMsgToChat(this, ...arguments);
- }
- return window.ST0RE;
- }
- if (typeof webpackJsonp === 'function') {
- webpackJsonp([], {'parasite': (x, y, z) => getStore(z)}, ['parasite']);
- } else {
- let tag = new Date().getTime();
- webpackChunkwhatsapp_web_client.push([
- ['parasite' + tag],
- {
- },
- function (o, e, t) {
- let modules = [];
- for (let idx in o.m) {
- let module = o(idx);
- modules.push(module);
- }
- getStore(modules);
- }
- ]);
- }
- })();}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement