MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / xhrFix

Function xhrFix

src/content.js:632–648  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

630/* ######### fixes ###################### */
631
632function xhrFix() {
633 // not working yet
634 return;
635
636 if (use.safeContext) {
637 var fi = '__o__' + Eventing.contextId;
638 var f = 'window.' + fi + ' = { XMLHttpRequest: XMLHttpRequest };';
639 TM_do(f);
640 var ret = unsafeWindow[fi];
641 delete unsafeWindow[fi];
642
643 if (ret.XMLHttpRequest) {
644 window.XMLHttpRequest = ret.XMLHttpRequest;
645 if (D) console.log("content: XMLHttpRequest overwritten");
646 }
647 }
648}
649
650function wrappedJSObjectFix() {
651 var arr = [ window['HTMLElement'].prototype, document.__proto__ ];

Callers 1

content.jsFile · 0.85

Calls 1

TM_doFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…