Update ad blocker workaround for 4channel domain.
This commit is contained in:
parent
589ede3b7c
commit
69a56f9e05
@ -50,7 +50,7 @@ $.ajax = do ->
|
|||||||
{onloadend, timeout, responseType, withCredentials, type, onprogress, form, headers} = options
|
{onloadend, timeout, responseType, withCredentials, type, onprogress, form, headers} = options
|
||||||
responseType ?= 'json'
|
responseType ?= 'json'
|
||||||
# XXX https://forums.lanik.us/viewtopic.php?f=64&t=24173&p=78310
|
# XXX https://forums.lanik.us/viewtopic.php?f=64&t=24173&p=78310
|
||||||
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'
|
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?(?:4chan|4channel|4cdn)\.org)\/adv\//, '$1//adv/'
|
||||||
r = new pageXHR()
|
r = new pageXHR()
|
||||||
type or= form and 'post' or 'get'
|
type or= form and 'post' or 'get'
|
||||||
try
|
try
|
||||||
|
|||||||
@ -12,7 +12,7 @@ eventPageRequest = do ->
|
|||||||
CrossOrigin =
|
CrossOrigin =
|
||||||
binary: (url, cb, headers={}) ->
|
binary: (url, cb, headers={}) ->
|
||||||
# XXX https://forums.lanik.us/viewtopic.php?f=64&t=24173&p=78310
|
# XXX https://forums.lanik.us/viewtopic.php?f=64&t=24173&p=78310
|
||||||
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'
|
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?(?:4chan|4channel|4cdn)\.org)\/adv\//, '$1//adv/'
|
||||||
<% if (type === 'crx') { %>
|
<% if (type === 'crx') { %>
|
||||||
eventPageRequest {type: 'ajax', url, headers, responseType: 'arraybuffer'}, ({response, responseHeaderString}) ->
|
eventPageRequest {type: 'ajax', url, headers, responseType: 'arraybuffer'}, ({response, responseHeaderString}) ->
|
||||||
response = new Uint8Array(response) if response
|
response = new Uint8Array(response) if response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user