@@ -11,20 +11,19 @@ export default {
1111 whiteList : [ "https://*.facebook.com/*" , "https://*.messenger.com/*" ] ,
1212
1313 onDocumentStart : ( ) => {
14- const WebSocketOrig = window . WebSocket ;
14+ // const WebSocketOrig = window.WebSocket;
15+ // window.WebSocket = function fakeConstructor(dt, config) {
16+ // const websocket_instant = new WebSocketOrig(dt, config);
17+ // websocket_instant.addEventListener("message", async function (achunk) {
18+ // const utf8_str = new TextDecoder("utf-8").decode(achunk.data);
19+ // // Do something here
20+ // console.log(utf8_str);
21+ // });
22+ // return websocket_instant;
23+ // };
1524
16- window . WebSocket = function fakeConstructor ( dt , config ) {
17- const websocket_instant = new WebSocketOrig ( dt , config ) ;
18- websocket_instant . addEventListener ( "message" , async function ( achunk ) {
19- // const utf8_str = new TextDecoder("utf-8").decode(achunk.data);
20- // Do something here
21- // console.log(utf8_str);
22- } ) ;
23- return websocket_instant ;
24- } ;
25-
26- window . WebSocket . prototype = WebSocketOrig . prototype ;
27- window . WebSocket . prototype . constructor = window . WebSocket ;
25+ // window.WebSocket.prototype = WebSocketOrig.prototype;
26+ // window.WebSocket.prototype.constructor = window.WebSocket;
2827
2928 // window.addEventListener(
3029 // "message",
@@ -34,7 +33,7 @@ export default {
3433 // !1
3534 // );
3635
37- console . log ( window . __d ) ;
36+ // console.log(window.__d);
3837 // let emptyFunc = void 0;
3938 // Object.defineProperty(window, "__d", {
4039 // get: () => emptyFunc,
0 commit comments