Work around EasyList /adv/ bug, take two. #217

Fix posting, posting from URL, WebM title, etc.
This commit is contained in:
ccd0 2016-01-10 14:34:48 -08:00
parent 548958ba83
commit fdac5dfc09
2 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,7 @@ $.ajax = do ->
(url, options={}, extra={}) ->
{type, whenModified, upCallbacks, form} = extra
# XXX https://forums.lanik.us/viewtopic.php?f=64&t=24173&p=78310
url = url.replace /^\/\/a\.4cdn\.org\/adv\//, '//a.4cdn.org//adv/'
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'
r = new XMLHttpRequest()
type or= form and 'post' or 'get'
try

View File

@ -11,6 +11,8 @@ CrossOrigin = do ->
<% } %>
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/'
<% if (type === 'crx') { %>
if /^https:\/\//.test(url) or location.protocol is 'http:'
xhr = new XMLHttpRequest()