Update for 4channel.org
This commit is contained in:
parent
244d41bb1e
commit
a1a084acca
16
package.json
16
package.json
@ -27,12 +27,18 @@
|
|||||||
"*://boards.4chan.org/*",
|
"*://boards.4chan.org/*",
|
||||||
"*://sys.4chan.org/*",
|
"*://sys.4chan.org/*",
|
||||||
"*://www.4chan.org/*",
|
"*://www.4chan.org/*",
|
||||||
|
"*://boards.4channel.org/*",
|
||||||
|
"*://sys.4channel.org/*",
|
||||||
|
"*://www.4channel.org/*",
|
||||||
"*://i.4cdn.org/*",
|
"*://i.4cdn.org/*",
|
||||||
"*://is.4chan.org/*",
|
"*://is.4chan.org/*",
|
||||||
"*://is2.4chan.org/*"
|
"*://is2.4chan.org/*",
|
||||||
|
"*://is.4channel.org/*",
|
||||||
|
"*://is2.4channel.org/*"
|
||||||
],
|
],
|
||||||
"matches_only": [
|
"matches_only": [
|
||||||
"*://*.4chan.org/*",
|
"*://*.4chan.org/*",
|
||||||
|
"*://*.4channel.org/*",
|
||||||
"*://*.4cdn.org/*"
|
"*://*.4cdn.org/*"
|
||||||
],
|
],
|
||||||
"matches": [
|
"matches": [
|
||||||
@ -48,7 +54,13 @@
|
|||||||
"*://www.4chan.org/advertise",
|
"*://www.4chan.org/advertise",
|
||||||
"*://www.4chan.org/advertise?*",
|
"*://www.4chan.org/advertise?*",
|
||||||
"*://www.4chan.org/donate",
|
"*://www.4chan.org/donate",
|
||||||
"*://www.4chan.org/donate?*"
|
"*://www.4chan.org/donate?*",
|
||||||
|
"*://www.4channel.org/pass",
|
||||||
|
"*://www.4channel.org/pass?*",
|
||||||
|
"*://www.4channel.org/advertise",
|
||||||
|
"*://www.4channel.org/advertise?*",
|
||||||
|
"*://www.4channel.org/donate",
|
||||||
|
"*://www.4channel.org/donate?*"
|
||||||
],
|
],
|
||||||
"grants": [
|
"grants": [
|
||||||
"GM_getValue",
|
"GM_getValue",
|
||||||
|
|||||||
@ -42,6 +42,12 @@ BoardConfig =
|
|||||||
sfwBoards: (sfw) ->
|
sfwBoards: (sfw) ->
|
||||||
board for board, data of (@boards or Conf['boardConfig'].boards) when !!data.ws_board is sfw
|
board for board, data of (@boards or Conf['boardConfig'].boards) when !!data.ws_board is sfw
|
||||||
|
|
||||||
|
isSFW: (board) ->
|
||||||
|
!!(@boards or Conf['boardConfig'].boards)[board]?.ws_board
|
||||||
|
|
||||||
|
domain: (board) ->
|
||||||
|
"boards.#{if BoardConfig.isSFW(board) then '4channel' else '4chan'}.org"
|
||||||
|
|
||||||
noAudio: (boardID) ->
|
noAudio: (boardID) ->
|
||||||
return false unless Site.software is 'yotsuba'
|
return false unless Site.software is 'yotsuba'
|
||||||
boards = @boards or Conf['boardConfig'].boards
|
boards = @boards or Conf['boardConfig'].boards
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Build.Test =
|
|||||||
$.rm el
|
$.rm el
|
||||||
for el in $$ 'a[href]', root2
|
for el in $$ 'a[href]', root2
|
||||||
href = el.href
|
href = el.href
|
||||||
href = href.replace /(^\w+:\/\/boards.4chan.org\/[^\/]+\/thread\/\d+)\/.*/, '$1'
|
href = href.replace /(^\w+:\/\/boards\.4chan(?:nel)?\.org\/[^\/]+\/thread\/\d+)\/.*/, '$1'
|
||||||
el.setAttribute 'href', href
|
el.setAttribute 'href', href
|
||||||
ImageHost.fixLinks $$('.fileText > a, a.fileThumb', root2)
|
ImageHost.fixLinks $$('.fileText > a, a.fileThumb', root2)
|
||||||
for el in $$ 'img[src]', root2
|
for el in $$ 'img[src]', root2
|
||||||
|
|||||||
@ -227,7 +227,7 @@ Header =
|
|||||||
|
|
||||||
boardID = t.split('-')[0]
|
boardID = t.split('-')[0]
|
||||||
if boardID is 'current'
|
if boardID is 'current'
|
||||||
if location.hostname is 'boards.4chan.org'
|
if location.hostname in ['boards.4chan.org', 'boards.4channel.org']
|
||||||
boardID = g.BOARD.ID
|
boardID = g.BOARD.ID
|
||||||
else
|
else
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
@ -246,7 +246,7 @@ Header =
|
|||||||
textContent: '@'
|
textContent: '@'
|
||||||
|
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: "//boards.4chan.org/#{boardID}/"
|
href: "//#{BoardConfig.domain(boardID)}/#{boardID}/"
|
||||||
textContent: boardID
|
textContent: boardID
|
||||||
title: BoardConfig.title(boardID)
|
title: BoardConfig.title(boardID)
|
||||||
a.href += g.VIEW if g.VIEW in ['catalog', 'archive']
|
a.href += g.VIEW if g.VIEW in ['catalog', 'archive']
|
||||||
@ -270,7 +270,7 @@ Header =
|
|||||||
|
|
||||||
if Conf['JSON Index'] and indexOptions
|
if Conf['JSON Index'] and indexOptions
|
||||||
a.dataset.indexOptions = indexOptions
|
a.dataset.indexOptions = indexOptions
|
||||||
if a.hostname is 'boards.4chan.org' and a.pathname.split('/')[2] is ''
|
if a.hostname in ['boards.4chan.org', 'boards.4channel.org'] and a.pathname.split('/')[2] is ''
|
||||||
a.href += (if a.hash then '/' else '#') + indexOptions
|
a.href += (if a.hash then '/' else '#') + indexOptions
|
||||||
|
|
||||||
if /-archive/.test t
|
if /-archive/.test t
|
||||||
@ -281,7 +281,7 @@ Header =
|
|||||||
|
|
||||||
if /-expired/.test t
|
if /-expired/.test t
|
||||||
if boardID not in ['b', 'f', 'trash', 'bant']
|
if boardID not in ['b', 'f', 'trash', 'bant']
|
||||||
a.href = "//boards.4chan.org/#{boardID}/archive"
|
a.href = "//#{BoardConfig.domain(boardID)}/#{boardID}/archive"
|
||||||
else
|
else
|
||||||
return a.firstChild # Its text node.
|
return a.firstChild # Its text node.
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,7 @@ Settings =
|
|||||||
cb $.el 'li',
|
cb $.el 'li',
|
||||||
textContent: """
|
textContent: """
|
||||||
<%= meta.name %> needs local storage to #{why}.
|
<%= meta.name %> needs local storage to #{why}.
|
||||||
Enable it on boards.4chan.org in your browser's privacy settings (may be listed as part of "local data" or "cookies").
|
Enable it on boards.#{location.hostname.split('.')[1]}.org in your browser's privacy settings (may be listed as part of "local data" or "cookies").
|
||||||
"""
|
"""
|
||||||
ads: (cb) ->
|
ads: (cb) ->
|
||||||
$.onExists doc, '.adg-rects > .desktop', (ad) -> $.onExists ad, 'iframe', ->
|
$.onExists doc, '.adg-rects > .desktop', (ad) -> $.onExists ad, 'iframe', ->
|
||||||
@ -456,6 +456,9 @@ Settings =
|
|||||||
if compareString < '00001.00014.00003.00002'
|
if compareString < '00001.00014.00003.00002'
|
||||||
if data['sauces']?
|
if data['sauces']?
|
||||||
set 'sauces', data['sauces'].replace(/^(#?\s*)https:\/\/whatanime\.ga\//mg, '$1https://trace.moe/')
|
set 'sauces', data['sauces'].replace(/^(#?\s*)https:\/\/whatanime\.ga\//mg, '$1https://trace.moe/')
|
||||||
|
if compareString < '00001.00014.00004.00004'
|
||||||
|
if data['siteSoftware']? and !/^4channel\.org yotsuba$/m.test(data['siteSoftware'])
|
||||||
|
set 'siteSoftware', data['siteSoftware'] + '\n4channel.org yotsuba'
|
||||||
changes
|
changes
|
||||||
|
|
||||||
loadSettings: (data, cb) ->
|
loadSettings: (data, cb) ->
|
||||||
|
|||||||
@ -14,7 +14,7 @@ ImageHost =
|
|||||||
test: (hostname) ->
|
test: (hostname) ->
|
||||||
hostname is 'i.4cdn.org' or ImageHost.regex.test(hostname)
|
hostname is 'i.4cdn.org' or ImageHost.regex.test(hostname)
|
||||||
|
|
||||||
regex: /^is\d*\.4chan\.org$/
|
regex: /^is\d*\.4chan(?:nel)?\.org$/
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
return if @isClone
|
return if @isClone
|
||||||
|
|||||||
@ -12,7 +12,7 @@ ReportLink =
|
|||||||
el: a
|
el: a
|
||||||
order: 10
|
order: 10
|
||||||
open: (post) ->
|
open: (post) ->
|
||||||
ReportLink.url = "//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
ReportLink.url = "//sys.#{location.hostname.split('.')[1]}.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
||||||
if d.cookie.indexOf('pass_enabled=1') >= 0
|
if d.cookie.indexOf('pass_enabled=1') >= 0
|
||||||
ReportLink.dims = 'width=350,height=275'
|
ReportLink.dims = 'width=350,height=275'
|
||||||
else
|
else
|
||||||
|
|||||||
@ -37,8 +37,8 @@ CatalogLinks =
|
|||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
for a in $$ 'a', @nodes.comment
|
for a in $$ 'a', @nodes.comment
|
||||||
if m = a.href.match /^https?:\/\/boards\.4chan\.org\/([^\/]+)\/catalog(#s=.*)?/
|
if m = a.href.match /^https?:\/\/boards\.4chan(?:nel)?\.org\/([^\/]+)\/catalog(#s=.*)?/
|
||||||
a.href = "//boards.4chan.org/#{m[1]}/#{m[2] or '#catalog'}"
|
a.href = "//boards.4chan(?:nel)?.org/#{m[1]}/#{m[2] or '#catalog'}"
|
||||||
return
|
return
|
||||||
|
|
||||||
toggle: ->
|
toggle: ->
|
||||||
@ -59,7 +59,7 @@ CatalogLinks =
|
|||||||
|
|
||||||
for a in $$('a:not([data-only])', list)
|
for a in $$('a:not([data-only])', list)
|
||||||
continue if (
|
continue if (
|
||||||
a.hostname not in ['boards.4chan.org', 'catalog.neet.tv'] or
|
a.hostname not in ['boards.4chan.org', 'boards.4channel.org', 'catalog.neet.tv'] or
|
||||||
!(board = a.pathname.split('/')[1]) or
|
!(board = a.pathname.split('/')[1]) or
|
||||||
board in ['f', 'status', '4chan'] or
|
board in ['f', 'status', '4chan'] or
|
||||||
a.pathname.split('/')[2] is 'archive' or
|
a.pathname.split('/')[2] is 'archive' or
|
||||||
@ -68,9 +68,9 @@ CatalogLinks =
|
|||||||
|
|
||||||
# Href is easier than pathname because then we don't have
|
# Href is easier than pathname because then we don't have
|
||||||
# conditions where External Catalog has been disabled between switches.
|
# conditions where External Catalog has been disabled between switches.
|
||||||
a.href = if Conf['Header catalog links'] then CatalogLinks.catalog(board) else "//boards.4chan.org/#{board}/"
|
a.href = if Conf['Header catalog links'] then CatalogLinks.catalog(board) else "//#{BoardConfig.domain(board)}/#{board}/"
|
||||||
|
|
||||||
if a.dataset.indexOptions and a.hostname is 'boards.4chan.org' and a.pathname.split('/')[2] is ''
|
if a.dataset.indexOptions and a.hostname in ['boards.4chan.org', 'boards.4channel.org'] and a.pathname.split('/')[2] is ''
|
||||||
a.href += (if a.hash then '/' else '#') + a.dataset.indexOptions
|
a.href += (if a.hash then '/' else '#') + a.dataset.indexOptions
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -78,12 +78,12 @@ CatalogLinks =
|
|||||||
if Conf['External Catalog'] and board in ['a', 'c', 'g', 'biz', 'k', 'm', 'o', 'p', 'v', 'vg', 'vr', 'w', 'wg', 'cm', '3', 'adv', 'an', 'asp', 'cgl', 'ck', 'co', 'diy', 'fa', 'fit', 'gd', 'int', 'jp', 'lit', 'mlp', 'mu', 'n', 'out', 'po', 'sci', 'sp', 'tg', 'toy', 'trv', 'tv', 'vp', 'wsg', 'x', 'f', 'pol', 's4s', 'lgbt']
|
if Conf['External Catalog'] and board in ['a', 'c', 'g', 'biz', 'k', 'm', 'o', 'p', 'v', 'vg', 'vr', 'w', 'wg', 'cm', '3', 'adv', 'an', 'asp', 'cgl', 'ck', 'co', 'diy', 'fa', 'fit', 'gd', 'int', 'jp', 'lit', 'mlp', 'mu', 'n', 'out', 'po', 'sci', 'sp', 'tg', 'toy', 'trv', 'tv', 'vp', 'wsg', 'x', 'f', 'pol', 's4s', 'lgbt']
|
||||||
"//catalog.neet.tv/#{board}/"
|
"//catalog.neet.tv/#{board}/"
|
||||||
else if Conf['JSON Index'] and Conf['Use <%= meta.name %> Catalog']
|
else if Conf['JSON Index'] and Conf['Use <%= meta.name %> Catalog']
|
||||||
if location.hostname is 'boards.4chan.org' and g.BOARD.ID is board and g.VIEW is 'index' then '#catalog' else "//boards.4chan.org/#{board}/#catalog"
|
if location.hostname in ['boards.4chan.org', 'boards.4channel.org'] and g.BOARD.ID is board and g.VIEW is 'index' then '#catalog' else "//#{BoardConfig.domain(board)}/#{board}/#catalog"
|
||||||
else
|
else
|
||||||
"//boards.4chan.org/#{board}/catalog"
|
"//#{BoardConfig.domain(board)}/#{board}/catalog"
|
||||||
|
|
||||||
index: (board=g.BOARD.ID) ->
|
index: (board=g.BOARD.ID) ->
|
||||||
if Conf['JSON Index'] and board isnt 'f'
|
if Conf['JSON Index'] and board isnt 'f'
|
||||||
if location.hostname is 'boards.4chan.org' and g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "//boards.4chan.org/#{board}/#index"
|
if location.hostname in ['boards.4chan.org', 'boards.4channel.org'] and g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "//#{BoardConfig.domain(board)}/#{board}/#index"
|
||||||
else
|
else
|
||||||
"//boards.4chan.org/#{board}/"
|
"//#{BoardConfig.domain(board)}/#{board}/"
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Captcha.replace =
|
|||||||
return
|
return
|
||||||
|
|
||||||
if Conf['captchaLanguage'].trim() or Conf['Captcha Fixes']
|
if Conf['captchaLanguage'].trim() or Conf['Captcha Fixes']
|
||||||
if location.hostname is 'boards.4chan.org'
|
if location.hostname in ['boards.4chan.org', 'boards.4channel.org']
|
||||||
$.onExists doc, '#captchaFormPart', (node) -> $.onExists node, 'iframe', Captcha.replace.iframe
|
$.onExists doc, '#captchaFormPart', (node) -> $.onExists node, 'iframe', Captcha.replace.iframe
|
||||||
else
|
else
|
||||||
$.onExists doc, 'iframe', Captcha.replace.iframe
|
$.onExists doc, 'iframe', Captcha.replace.iframe
|
||||||
|
|||||||
@ -10,7 +10,7 @@ PassLink =
|
|||||||
className: 'brackets-wrap pass-link-container'
|
className: 'brackets-wrap pass-link-container'
|
||||||
$.extend passLink, <%= html('<a href="javascript:;">4chan Pass</a>') %>
|
$.extend passLink, <%= html('<a href="javascript:;">4chan Pass</a>') %>
|
||||||
$.on passLink.firstElementChild, 'click', ->
|
$.on passLink.firstElementChild, 'click', ->
|
||||||
window.open '//sys.4chan.org/auth',
|
window.open "//sys.#{location.hostname.split('.')[1]}.org/auth",
|
||||||
Date.now()
|
Date.now()
|
||||||
'width=500,height=280,toolbar=0'
|
'width=500,height=280,toolbar=0'
|
||||||
$.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')]
|
$.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')]
|
||||||
|
|||||||
@ -740,7 +740,7 @@ QR =
|
|||||||
extra.form.append 'recaptcha_response_field', response.response
|
extra.form.append 'recaptcha_response_field', response.response
|
||||||
else
|
else
|
||||||
extra.form.append 'g-recaptcha-response', response.response
|
extra.form.append 'g-recaptcha-response', response.response
|
||||||
QR.req = $.ajax "https://sys.4chan.org/#{g.BOARD}/post", options, extra
|
QR.req = $.ajax "https://sys.#{location.hostname.split('.')[1]}.org/#{g.BOARD}/post", options, extra
|
||||||
QR.req.progress = '...'
|
QR.req.progress = '...'
|
||||||
|
|
||||||
if typeof captcha is 'function'
|
if typeof captcha is 'function'
|
||||||
|
|||||||
@ -23,7 +23,7 @@ Quotify =
|
|||||||
|
|
||||||
parseArchivelink: (link) ->
|
parseArchivelink: (link) ->
|
||||||
return if not (m = link.pathname.match /^\/([^/]+)\/thread\/S?(\d+)\/?$/)
|
return if not (m = link.pathname.match /^\/([^/]+)\/thread\/S?(\d+)\/?$/)
|
||||||
return if link.hostname is 'boards.4chan.org'
|
return if link.hostname in ['boards.4chan.org', 'boards.4channel.org']
|
||||||
boardID = m[1]
|
boardID = m[1]
|
||||||
threadID = m[2]
|
threadID = m[2]
|
||||||
postID = link.hash.match(/^#[pq]?(\d+)$|$/)[1] or threadID
|
postID = link.hash.match(/^#[pq]?(\d+)$|$/)[1] or threadID
|
||||||
|
|||||||
@ -1138,5 +1138,6 @@ Config =
|
|||||||
|
|
||||||
siteSoftware: """
|
siteSoftware: """
|
||||||
4chan.org yotsuba
|
4chan.org yotsuba
|
||||||
|
4channel.org yotsuba
|
||||||
4cdn.org yotsuba
|
4cdn.org yotsuba
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Main =
|
|||||||
return
|
return
|
||||||
|
|
||||||
# XXX Remove document-breaking ad
|
# XXX Remove document-breaking ad
|
||||||
if location.hostname is 'boards.4chan.org'
|
if location.hostname in ['boards.4chan.org', 'boards.4channel.org']
|
||||||
$.global ->
|
$.global ->
|
||||||
fromCharCode0 = String.fromCharCode
|
fromCharCode0 = String.fromCharCode
|
||||||
String.fromCharCode = ->
|
String.fromCharCode = ->
|
||||||
@ -78,7 +78,7 @@ Main =
|
|||||||
Conf['Toggleable Thread Watcher'] = true
|
Conf['Toggleable Thread Watcher'] = true
|
||||||
|
|
||||||
# Enforce JS whitelist
|
# Enforce JS whitelist
|
||||||
if /\.4chan\.org$/.test(location.hostname) and !$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length
|
if /\.4chan(?:nel)?\.org$/.test(location.hostname) and !$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length
|
||||||
($.getSync or $.get) {'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) ->
|
($.getSync or $.get) {'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) ->
|
||||||
$.addCSP "script-src #{jsWhitelist.replace(/^#.*$/mg, '').replace(/[\s;]+/g, ' ').trim()}"
|
$.addCSP "script-src #{jsWhitelist.replace(/^#.*$/mg, '').replace(/[\s;]+/g, ' ').trim()}"
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ Main =
|
|||||||
items[key] = undefined for key of Conf
|
items[key] = undefined for key of Conf
|
||||||
items['previousversion'] = undefined
|
items['previousversion'] = undefined
|
||||||
($.getSync or $.get) items, (items) ->
|
($.getSync or $.get) items, (items) ->
|
||||||
if !$.perProtocolSettings and /\.4chan\.org$/.test(location.hostname) and (items['Redirect to HTTPS'] ? Conf['Redirect to HTTPS']) and location.protocol isnt 'https:'
|
if !$.perProtocolSettings and /\.4chan(?:nel)?\.org$/.test(location.hostname) and (items['Redirect to HTTPS'] ? Conf['Redirect to HTTPS']) and location.protocol isnt 'https:'
|
||||||
location.replace('https://' + location.host + location.pathname + location.search + location.hash)
|
location.replace('https://' + location.host + location.pathname + location.search + location.hash)
|
||||||
return
|
return
|
||||||
$.asap docSet, ->
|
$.asap docSet, ->
|
||||||
@ -125,7 +125,7 @@ Main =
|
|||||||
initFeatures: ->
|
initFeatures: ->
|
||||||
{hostname, search} = location
|
{hostname, search} = location
|
||||||
pathname = location.pathname.split /\/+/
|
pathname = location.pathname.split /\/+/
|
||||||
g.BOARD = new Board pathname[1] unless hostname is 'www.4chan.org'
|
g.BOARD = new Board pathname[1] unless hostname in ['www.4chan.org', 'www.4channel.org']
|
||||||
|
|
||||||
$.global ->
|
$.global ->
|
||||||
document.documentElement.classList.add 'js-enabled'
|
document.documentElement.classList.add 'js-enabled'
|
||||||
@ -133,11 +133,11 @@ Main =
|
|||||||
Main.jsEnabled = $.hasClass doc, 'js-enabled'
|
Main.jsEnabled = $.hasClass doc, 'js-enabled'
|
||||||
|
|
||||||
switch hostname
|
switch hostname
|
||||||
when 'www.4chan.org'
|
when 'www.4chan.org', 'www.4channel.org'
|
||||||
$.onExists doc, 'body', -> $.addStyle CSS.www
|
$.onExists doc, 'body', -> $.addStyle CSS.www
|
||||||
Captcha.replace.init()
|
Captcha.replace.init()
|
||||||
return
|
return
|
||||||
when 'sys.4chan.org'
|
when 'sys.4chan.org', 'sys.4channel.org'
|
||||||
if pathname[2] is 'imgboard.php'
|
if pathname[2] is 'imgboard.php'
|
||||||
if /\bmode=report\b/.test search
|
if /\bmode=report\b/.test search
|
||||||
Report.init()
|
Report.init()
|
||||||
|
|||||||
@ -35,6 +35,7 @@
|
|||||||
})()
|
})()
|
||||||
%>
|
%>
|
||||||
// @connect 4chan.org
|
// @connect 4chan.org
|
||||||
|
// @connect 4channel.org
|
||||||
// @connect 4cdn.org
|
// @connect 4cdn.org
|
||||||
// @connect mayhemydg.github.io
|
// @connect mayhemydg.github.io
|
||||||
<%=
|
<%=
|
||||||
|
|||||||
@ -47,7 +47,7 @@ SW.yotsuba =
|
|||||||
regexp:
|
regexp:
|
||||||
quotelink:
|
quotelink:
|
||||||
///
|
///
|
||||||
^https?://boards\.4chan\.org/+
|
^https?://boards\.4chan(?:nel)?\.org/+
|
||||||
([^/]+) # boardID
|
([^/]+) # boardID
|
||||||
/+thread/+
|
/+thread/+
|
||||||
(\d+) # threadID
|
(\d+) # threadID
|
||||||
@ -63,7 +63,7 @@ SW.yotsuba =
|
|||||||
|
|
||||||
isThisPageLegit: ->
|
isThisPageLegit: ->
|
||||||
# not 404 error page or similar.
|
# not 404 error page or similar.
|
||||||
location.hostname is 'boards.4chan.org' and
|
location.hostname in ['boards.4chan.org', 'boards.4channel.org'] and
|
||||||
d.doctype and
|
d.doctype and
|
||||||
!$('link[href*="favicon-status.ico"]', d.head) and
|
!$('link[href*="favicon-status.ico"]', d.head) and
|
||||||
d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out', 'MathJax Equation Source']
|
d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out', 'MathJax Equation Source']
|
||||||
@ -76,7 +76,7 @@ SW.yotsuba =
|
|||||||
return g.VIEW in ['index', 'thread'] and not $('.board + *')
|
return g.VIEW in ['index', 'thread'] and not $('.board + *')
|
||||||
|
|
||||||
isAuxiliaryPage: ->
|
isAuxiliaryPage: ->
|
||||||
location.hostname isnt 'boards.4chan.org'
|
location.hostname not in ['boards.4chan.org', 'boards.4channel.org']
|
||||||
|
|
||||||
scriptData: ->
|
scriptData: ->
|
||||||
for script in $$ 'script:not([src])', d.head
|
for script in $$ 'script:not([src])', d.head
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user