Browse Source

feat: support GM_xmlhttpRequest#res#context

close violentmonkey/violentmonkey#90
Gerald 8 years ago
parent
commit
f1903a32fa
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/injected.js

+ 1 - 0
src/injected.js

@@ -282,6 +282,7 @@
           if (!req.data) req.data = [parseData(res, req.details)];
           if (!req.data) req.data = [parseData(res, req.details)];
           res.data.response = req.data[0];
           res.data.response = req.data[0];
         }
         }
+        res.data.context = req.details.context;
         cb(res.data);
         cb(res.data);
       }
       }
       if (res.type === 'loadend') delete comm.requests[req.id];
       if (res.type === 'loadend') delete comm.requests[req.id];