Add basic support for is.4chan.org domain. #1141
This commit is contained in:
parent
4dada7b713
commit
f9d1f2c766
@ -26,6 +26,7 @@
|
|||||||
"*://sys.4chan.org/*",
|
"*://sys.4chan.org/*",
|
||||||
"*://www.4chan.org/*",
|
"*://www.4chan.org/*",
|
||||||
"*://i.4cdn.org/*",
|
"*://i.4cdn.org/*",
|
||||||
|
"*://is.4chan.org/*",
|
||||||
"https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
"https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
||||||
"https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
"https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
|
||||||
"*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*"
|
"*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*"
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Linkify =
|
|||||||
node: ->
|
node: ->
|
||||||
return Embedding.events @ if @isClone
|
return Embedding.events @ if @isClone
|
||||||
return unless Linkify.regString.test @info.comment
|
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'
|
$.addClass link, 'linkify'
|
||||||
Embedding.process link, @
|
Embedding.process link, @
|
||||||
links = Linkify.process @nodes.comment
|
links = Linkify.process @nodes.comment
|
||||||
|
|||||||
@ -129,7 +129,7 @@ Main =
|
|||||||
else if pathname[2] is 'post'
|
else if pathname[2] is 'post'
|
||||||
PostSuccessful.init()
|
PostSuccessful.init()
|
||||||
return
|
return
|
||||||
when 'i.4cdn.org'
|
when 'i.4cdn.org', 'is.4chan.org'
|
||||||
return unless pathname[2] and not /s\.jpg$/.test(pathname[2])
|
return unless pathname[2] and not /s\.jpg$/.test(pathname[2])
|
||||||
$.asap (-> d.readyState isnt 'loading'), ->
|
$.asap (-> d.readyState isnt 'loading'), ->
|
||||||
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
||||||
|
|||||||
@ -35,6 +35,7 @@
|
|||||||
})()
|
})()
|
||||||
%>
|
%>
|
||||||
// @connect i.4cdn.org
|
// @connect i.4cdn.org
|
||||||
|
// @connect is.4chan.org
|
||||||
// @connect *
|
// @connect *
|
||||||
<%=
|
<%=
|
||||||
meta.grants.map(function(grant) {
|
meta.grants.map(function(grant) {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ CrossOrigin =
|
|||||||
# 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+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'
|
||||||
<% if (type === 'crx') { %>
|
<% 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 = new XMLHttpRequest()
|
||||||
xhr.open 'GET', url, true
|
xhr.open 'GET', url, true
|
||||||
xhr.setRequestHeader key, value for key, value of headers
|
xhr.setRequestHeader key, value for key, value of headers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user