New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gmxhr-fetch

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmxhr-fetch - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

1

gmxhr-fetch.js

@@ -26,2 +26,3 @@ ;((global, fn) => {

}
init.data = init.body
init = Object.assign(

@@ -28,0 +29,0 @@ {

2

gmxhr-fetch.min.js

@@ -1,1 +0,1 @@

((a,b)=>{a.gmfetch=b("undefined"==typeof GM?{}:GM)})(this,a=>{if("undefined"==typeof GM_xmlhttpRequest&&"undefined"==typeof a.xmlHttpRequest)throw new Error("Either GM_xmlhttpRequest or GM.xmlHttpRequest must exists!");"function"!=typeof GM_xmlhttpRequest||a.xmlHttpRequest||(a.xmlHttpRequest=GM_xmlhttpRequest);const b=a=>a.reduce((a,[b,c])=>(a[b]=c,a),{}),c=a=>b(a.split("\n").filter(Boolean).map(a=>a.split(":").map(a=>a.trim()))),d=(e,f={})=>e instanceof Request?d(e.url,Object.assign({},e,f)):new Promise(d=>{f.headers instanceof Headers&&(f.headers=b(Array.from(f.headers.entries()))),f=Object.assign({method:"GET",headers:{}},f,{url:e,responseType:"blob"}),a.xmlHttpRequest(Object.assign({},f,{onload:a=>{a.headers=c(a.responseHeaders),d(new Response(a.response,Object.assign({},f,a)))},onerror:a=>{console.log("err",a),d(new Response(a.response,Object.assign({},f,a)))}}))});return d});
((a,b)=>{a.gmfetch=b("undefined"==typeof GM?{}:GM)})(this,a=>{if("undefined"==typeof GM_xmlhttpRequest&&"undefined"==typeof a.xmlHttpRequest)throw new Error("Either GM_xmlhttpRequest or GM.xmlHttpRequest must exists!");"function"!=typeof GM_xmlhttpRequest||a.xmlHttpRequest||(a.xmlHttpRequest=GM_xmlhttpRequest);const b=a=>a.reduce((a,[b,c])=>(a[b]=c,a),{}),c=a=>b(a.split("\n").filter(Boolean).map(a=>a.split(":").map(a=>a.trim()))),d=(e,f={})=>e instanceof Request?d(e.url,Object.assign({},e,f)):new Promise(d=>{f.headers instanceof Headers&&(f.headers=b(Array.from(f.headers.entries()))),f.data=f.body,f=Object.assign({method:"GET",headers:{}},f,{url:e,responseType:"blob"}),a.xmlHttpRequest(Object.assign({},f,{onload:a=>{a.headers=c(a.responseHeaders),d(new Response(a.response,Object.assign({},f,a)))},onerror:a=>{console.log("err",a),d(new Response(a.response,Object.assign({},f,a)))}}))});return d});
{
"name": "gmxhr-fetch",
"version": "0.0.6",
"version": "0.1.0",
"description": "fetch-like wrapper for GM_xmlhttpRequest.",

@@ -5,0 +5,0 @@ "main": "gmxhr-fetch.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc