Link former Samachan users to SushiChan with one-time notification.

This commit is contained in:
ccd0 2020-05-24 09:34:19 -07:00
parent f326074005
commit dd4efa6bca
2 changed files with 13 additions and 6 deletions

View File

@ -1,9 +1,14 @@
PSA =
init: ->
return unless g.SITE.software is 'yotsuba'
if g.BOARD.ID is 'qa'
if g.SITE.software is 'yotsuba' and g.BOARD.ID is 'qa'
announcement = <%= html('Stay in touch with your <a href="https://www.4chan-x.net/qa_friends.html" target="_blank" rel="noopener">/qa/ friends</a>!') %>
return unless announcement
el = $.el 'div', {className: 'fcx-announcement'}, announcement
$.onExists doc, '.boardBanner', (banner) ->
$.after banner, el
el = $.el 'div', {className: 'fcx-announcement'}, announcement
$.onExists doc, '.boardBanner', (banner) ->
$.after banner, el
if 'samachan.org' of Conf['siteProperties'] and 'samachan' not in Conf['PSAseen']
el = $.el 'span',
<%= html('<a href="https://sushigirl.us/yakuza/res/776.html" target="_blank" rel="noopener">Looking for a new home?<br>Some former Samachan users are regrouping on SushiChan.</a><br>(a message from 4chan X)') %>
Main.ready ->
new Notice 'info', el
Conf['PSAseen'].push('samachan')
$.set 'PSAseen', Conf['PSAseen']

View File

@ -1180,3 +1180,5 @@ Config =
passMessageClosed: false
'Prerequest Captcha': false
'PSAseen': [[]]