Add message to 4chan Pass buyers.
This commit is contained in:
parent
ca58184cfe
commit
f086c2ec52
@ -80,14 +80,10 @@
|
||||
"*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*"
|
||||
],
|
||||
"exclude_matches": [
|
||||
"*://www.4chan.org/pass",
|
||||
"*://www.4chan.org/pass?*",
|
||||
"*://www.4chan.org/advertise",
|
||||
"*://www.4chan.org/advertise?*",
|
||||
"*://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",
|
||||
|
||||
11
src/Miscellaneous/PassMessage.coffee
Normal file
11
src/Miscellaneous/PassMessage.coffee
Normal file
@ -0,0 +1,11 @@
|
||||
PassMessage =
|
||||
init: ->
|
||||
msg = $.el 'div',
|
||||
className: 'box-outer top-box'
|
||||
,
|
||||
`<%= readHTML('PassMessage.html') %>`
|
||||
$.ready ->
|
||||
if (hd = $.id 'hd')
|
||||
$.after hd, msg
|
||||
else
|
||||
$.prepend d.body, msg
|
||||
20
src/Miscellaneous/PassMessage/PassMessage.html
Normal file
20
src/Miscellaneous/PassMessage/PassMessage.html
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="box-inner">
|
||||
<div class="boxbar"><h2>Trouble buying a 4chan Pass? (a message from 4chan X)</h2></div>
|
||||
<div class="boxcontent">
|
||||
<p>
|
||||
You can buy solved CAPTCHAs at <%= meta.captchaServiceLinks.map(function(x) {return '<a href="' + x[1] + '" target="_blank" rel="noopener">' + x[0] + '</a>'}).join(', ') %>, and similar services.
|
||||
They're a bit slow, but sufficient for image dumping.
|
||||
Depending on how much you post, this can be cheaper than a Pass, and it doesn't require cryptocurrency to purchase.
|
||||
4chan X has integrated support for services that use 2captcha's API.
|
||||
Go to <b>Advanced > Captcha Solving Service</b> in the settings panel to set it up.
|
||||
</p>
|
||||
<p>
|
||||
If you're thinking of buying a Pass because of annoying "Click verify once there are none left" captchas, you may be able to get rid of them for free by checking <b>Force Noscript Captcha</b> in your settings.
|
||||
</p>
|
||||
<p>
|
||||
Most imageboards either don't require captchas to post at all or require them only in limited circumstances.
|
||||
Consider using another site.
|
||||
4chan X works on many Tinyboard-based sites by default, and if your preferred site isn't on the default list, you can enable 4chan X on it by following <a href="<%= meta.faq %>#other-imageboards" target="_blank" rel="noopener">these instructions</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -79,7 +79,11 @@ Main =
|
||||
Conf['Use Faster Image Host'] = 'true'
|
||||
|
||||
# Enforce JS whitelist
|
||||
if /\.4chan(?:nel)?\.org$/.test(location.hostname) and !$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length
|
||||
if (
|
||||
/\.4chan(?:nel)?\.org$/.test(location.hostname) and
|
||||
!SW.yotsuba.regexp.pass.test(location.href) and
|
||||
!$$('script:not([src])', d).filter((s) -> /this\[/.test(s.textContent)).length
|
||||
)
|
||||
($.getSync or $.get) {'jsWhitelist': Conf['jsWhitelist']}, ({jsWhitelist}) ->
|
||||
$.addCSP "script-src #{jsWhitelist.replace(/^#.*$/mg, '').replace(/[\s;]+/g, ' ').trim()}"
|
||||
|
||||
|
||||
@ -100,6 +100,8 @@ SW.yotsuba =
|
||||
///
|
||||
quotelinkHTML:
|
||||
/<a [^>]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g
|
||||
pass:
|
||||
/^https?:\/\/www\.4chan(?:nel)?\.org\/+pass(?:$|[?#])/
|
||||
|
||||
bgColoredEl: ->
|
||||
$.el 'div', className: 'reply'
|
||||
@ -130,8 +132,11 @@ SW.yotsuba =
|
||||
initAuxiliary: ->
|
||||
switch location.hostname
|
||||
when 'www.4chan.org', 'www.4channel.org'
|
||||
$.onExists doc, 'body', -> $.addStyle CSS.www
|
||||
Captcha.replace.init()
|
||||
if SW.yotsuba.regexp.pass.test(location.href)
|
||||
PassMessage.init()
|
||||
else
|
||||
$.onExists doc, 'body', -> $.addStyle CSS.www
|
||||
Captcha.replace.init()
|
||||
return
|
||||
when 'sys.4chan.org', 'sys.4channel.org'
|
||||
pathname = location.pathname.split /\/+/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user