Add basic support for is.4chan.org domain. #1141

This commit is contained in:
ccd0 2016-10-15 00:48:47 -07:00
parent 3f4e844a07
commit f8523a5bcc
5 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,7 @@
"*://sys.4chan.org/*",
"*://www.4chan.org/*",
"*://i.4cdn.org/*",
"*://is.4chan.org/*",
"https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
"https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
"*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*"

View File

@ -18,7 +18,7 @@ Linkify =
node: ->
return Embedding.events @ if @isClone
return unless Linkify.regString.test @info.comment
for link in $$ 'a[href^="http://i.4cdn.org/"], a[href^="https://i.4cdn.org/"]', @nodes.comment
for link in $$ 'a[href^="http://i.4cdn.org/"], a[href^="https://i.4cdn.org/"], a[href^="http://is.4chan.org/"], a[href^="https://is.4chan.org/"]', @nodes.comment
$.addClass link, 'linkify'
Embedding.process link, @
links = Linkify.process @nodes.comment

View File

@ -128,7 +128,7 @@ Main =
else if pathname[2] is 'post'
PostSuccessful.init()
return
when 'i.4cdn.org'
when 'i.4cdn.org', 'is.4chan.org'
return unless pathname[2] and not /s\.jpg$/.test(pathname[2])
$.asap (-> d.readyState isnt 'loading'), ->
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']

View File

@ -35,6 +35,7 @@
})()
%>
// @connect i.4cdn.org
// @connect is.4chan.org
// @connect *
<%=
meta.grants.map(function(grant) {

View File

@ -14,7 +14,7 @@ CrossOrigin =
# 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 url.split('/')[...3].join('/') is "#{location.protocol}//i.4cdn.org"
if url.split('/')[...3].join('/') in ["#{location.protocol}//i.4cdn.org", "#{location.protocol}//is.4chan.org"]
xhr = new XMLHttpRequest()
xhr.open 'GET', url, true
xhr.setRequestHeader key, value for key, value of headers