Label reports to archive as to archive, don't redirect rule vio reports. #404
This commit is contained in:
parent
b7d9a617ca
commit
e517b6426f
@ -5,16 +5,18 @@ ReportLink =
|
||||
a = $.el 'a',
|
||||
className: 'report-link'
|
||||
href: 'javascript:;'
|
||||
textContent: 'Report this post'
|
||||
$.on a, 'click', ReportLink.report
|
||||
|
||||
Menu.menu.addEntry
|
||||
el: a
|
||||
order: 10
|
||||
open: (post) ->
|
||||
unless post.isDead or (post.thread.isDead and not post.thread.isArchived)
|
||||
a.textContent = 'Report this post'
|
||||
ReportLink.url = "//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
||||
ReportLink.height = 200
|
||||
else if Conf['Archive Report']
|
||||
a.textContent = 'Report to archive'
|
||||
ReportLink.url = Redirect.to 'report', {boardID: post.board.ID, postID: post.ID}
|
||||
ReportLink.height = 350
|
||||
else
|
||||
|
||||
@ -31,14 +31,20 @@ Report =
|
||||
return unless url = Redirect.to 'report', {boardID: g.BOARD.ID, postID: Report.postID}
|
||||
|
||||
if (message = $ 'h3') and /Report submitted!/.test(message.textContent)
|
||||
$.globalEval 'self.close = function(){};'
|
||||
window.resizeBy 0, 350 - doc.clientHeight
|
||||
location.replace url
|
||||
if location.hash is '#redirect'
|
||||
$.globalEval 'self.close = function(){};'
|
||||
window.resizeBy 0, 350 - doc.clientHeight
|
||||
location.replace url
|
||||
return
|
||||
|
||||
link = $.el 'a',
|
||||
href: url
|
||||
textContent: 'Report to fgts'
|
||||
textContent: 'Report to archive'
|
||||
$.on link, 'click', (e) ->
|
||||
unless e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
window.resizeBy 0, 350 - doc.clientHeight
|
||||
$.add d.body, [$.tn(' ['), link, $.tn(']')]
|
||||
|
||||
if types = $.id('reportTypes')
|
||||
$.on types, 'change', (e) ->
|
||||
$('form').action = if e.target.value in ['illegal', 'spam'] then '#redirect' else ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user