Add Board Tips.
This commit is contained in:
parent
07b5b52a2c
commit
a751c74797
20
src/Miscellaneous/BoardTips.coffee
Normal file
20
src/Miscellaneous/BoardTips.coffee
Normal 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
|
||||||
@ -51,6 +51,7 @@ Main =
|
|||||||
Conf['selectedArchives'] = {}
|
Conf['selectedArchives'] = {}
|
||||||
Conf['cooldowns'] = {}
|
Conf['cooldowns'] = {}
|
||||||
Conf['Index Sort'] = {}
|
Conf['Index Sort'] = {}
|
||||||
|
Conf['BoardTips.seen'] = {}
|
||||||
Conf["Last Long Reply Thresholds #{i}"] = {} for i in [0...2]
|
Conf["Last Long Reply Thresholds #{i}"] = {} for i in [0...2]
|
||||||
|
|
||||||
# XXX old key names
|
# XXX old key names
|
||||||
@ -508,6 +509,7 @@ Main =
|
|||||||
['Banner', Banner]
|
['Banner', Banner]
|
||||||
['Flash Features', Flash]
|
['Flash Features', Flash]
|
||||||
['Reply Pruning', ReplyPruning]
|
['Reply Pruning', ReplyPruning]
|
||||||
|
['Board Tips', BoardTips]
|
||||||
<% if (readJSON('/.tests_enabled')) { %>
|
<% if (readJSON('/.tests_enabled')) { %>
|
||||||
['Build Test', Build.Test]
|
['Build Test', Build.Test]
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user