Add Board Tips.

This commit is contained in:
ccd0 2017-08-03 21:25:42 -07:00
parent 07b5b52a2c
commit a751c74797
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,20 @@
BoardTips =
tips:
qa: [
1
<%= html(
'New to /qa/?<br>' +
'/qa/ is NOT an effective way to contact the mods.<br>' +
'Use <a href="https://www.rizon.net/chat" target="_blank">IRC</a> or <a href="https://www.4chan.org/feedback" target="_blank">feedback</a> instead. ' +
'More details <a href="https://www.4chan-x.net/qa_instructions.png" target="_blank">here</a>.'
) %>
]
init: ->
tip = BoardTips.tips[g.BOARD.ID]
seen = Conf['BoardTips.seen']
return if !tip or (seen[g.BOARD.ID] and seen[g.BOARD.ID] >= tip[0])
seen[g.BOARD.ID] = tip[0]
$.set 'BoardTips.seen', seen
el = $.el 'span', tip[1]
new Notice 'info', el

View File

@ -51,6 +51,7 @@ Main =
Conf['selectedArchives'] = {}
Conf['cooldowns'] = {}
Conf['Index Sort'] = {}
Conf['BoardTips.seen'] = {}
Conf["Last Long Reply Thresholds #{i}"] = {} for i in [0...2]
# XXX old key names
@ -508,6 +509,7 @@ Main =
['Banner', Banner]
['Flash Features', Flash]
['Reply Pruning', ReplyPruning]
['Board Tips', BoardTips]
<% if (readJSON('/.tests_enabled')) { %>
['Build Test', Build.Test]
<% } %>