Update ad blocker workaround for 4channel domain.

This commit is contained in:
ccd0 2019-04-24 03:11:25 -07:00
parent 589ede3b7c
commit 69a56f9e05
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ $.ajax = do ->
{onloadend, timeout, responseType, withCredentials, type, onprogress, form, headers} = options
responseType ?= 'json'
# 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()
type or= form and 'post' or 'get'
try

View File

@ -12,7 +12,7 @@ eventPageRequest = do ->
CrossOrigin =
binary: (url, cb, headers={}) ->
# 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') { %>
eventPageRequest {type: 'ajax', url, headers, responseType: 'arraybuffer'}, ({response, responseHeaderString}) ->
response = new Uint8Array(response) if response