Created
January 19, 2026 07:20
-
-
Save salman0ansari/b44c2729112a9c209c2c2fb3b8609891 to your computer and use it in GitHub Desktop.
enable calls on whatsapp web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name WhatsApp Web Calling Enabler | |
| // @namespace https://hisalman.in | |
| // @version 1.0 | |
| // @description Enable calling features in WhatsApp Web by overriding AB test configurations. | |
| // @author salman0ansari | |
| // @match https://web.whatsapp.com/* | |
| // @run-at document-start | |
| // @grant none | |
| // ==/UserScript== | |
| // ==OpenUserJS== | |
| // @author salman0ansari | |
| // ==/OpenUserJS== | |
| (function () { | |
| function wrap(func) { | |
| return function (...args) { | |
| const key = args[0]; | |
| switch (key) { | |
| case 'enable_web_calling': | |
| case 'enable_web_group_calling': | |
| case 'web_voip_call_tab_new_call': | |
| return true; | |
| case 'calling_lid_version': | |
| return 1; | |
| case 'heartbeat_interval_s': | |
| return 5; | |
| default: | |
| return func(...args); | |
| } | |
| }; | |
| } | |
| const timer = setInterval(() => { | |
| try { | |
| const mod = window.require && window.require("WAWebABProps"); | |
| if (!mod || !mod.getABPropConfigValue) return; | |
| // already hooked on THIS copy? | |
| if (mod.getABPropConfigValue.__wa_hooked__) return; | |
| const original = mod.getABPropConfigValue; | |
| const hooked = wrap(original); | |
| hooked.__wa_hooked__ = true; | |
| hooked.__wa_original__ = original; | |
| mod.getABPropConfigValue = hooked; | |
| console.log("[WA Calling Enabler] AB props patched"); | |
| } catch {} | |
| }, 500); | |
| })(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment