Remove obsolete workarounds for fixed JS Blocker bugs. #904
This commit is contained in:
parent
ac1cb8a50e
commit
58da030e3b
@ -51,21 +51,15 @@ CrossOrigin =
|
|||||||
i++
|
i++
|
||||||
else
|
else
|
||||||
data = new Uint8Array xhr.response
|
data = new Uint8Array xhr.response
|
||||||
if typeof xhr.responseHeaders is 'object'
|
contentType = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)?[1]
|
||||||
# XXX https://github.com/infernoboy/JavaScript-Blocker/issues/35
|
contentDisposition = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)?[1]
|
||||||
contentType = xhr.responseHeaders['Content-Type']
|
|
||||||
contentDisposition = xhr.responseHeaders['Content-Disposition']
|
|
||||||
else
|
|
||||||
contentType = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)?[1]
|
|
||||||
contentDisposition = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)?[1]
|
|
||||||
cb data, contentType, contentDisposition
|
cb data, contentType, contentDisposition
|
||||||
onerror: ->
|
onerror: ->
|
||||||
cb null
|
cb null
|
||||||
onabort: ->
|
onabort: ->
|
||||||
cb null
|
cb null
|
||||||
if workaround
|
if workaround
|
||||||
# XXX https://github.com/infernoboy/JavaScript-Blocker/issues/35
|
options.overrideMimeType = 'text/plain; charset=x-user-defined'
|
||||||
options.overrideMimeType = options.mimeType = 'text/plain; charset=x-user-defined'
|
|
||||||
else
|
else
|
||||||
options.responseType = 'arraybuffer'
|
options.responseType = 'arraybuffer'
|
||||||
GM_xmlhttpRequest options
|
GM_xmlhttpRequest options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user