Fix size of window for reporting to archive.
Also fix report menu item for 404'd thread.
This commit is contained in:
parent
80af390b59
commit
7ec2ebdcc8
@ -11,14 +11,18 @@ ReportLink =
|
||||
el: a
|
||||
order: 10
|
||||
open: (post) ->
|
||||
ReportLink.url = unless post.isDead
|
||||
"//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
||||
unless post.isDead or (post.thread.isDead and not post.thread.isArchived)
|
||||
ReportLink.url = "//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
||||
ReportLink.height = 200
|
||||
else if Conf['Archive Report']
|
||||
Redirect.to 'report', {boardID: post.board.ID, postID: post.ID}
|
||||
ReportLink.url = Redirect.to 'report', {boardID: post.board.ID, postID: post.ID}
|
||||
ReportLink.height = 350
|
||||
else
|
||||
ReportLink.url = ''
|
||||
!!ReportLink.url
|
||||
|
||||
report: ->
|
||||
{url} = ReportLink
|
||||
{url, height} = ReportLink
|
||||
id = Date.now()
|
||||
set = "toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,width=685,height=200"
|
||||
set = "toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,width=700,height=#{height}"
|
||||
window.open url, id, set
|
||||
|
||||
@ -22,7 +22,7 @@ Report =
|
||||
|
||||
if (message = $ 'h3') and /Report submitted!/.test(message.textContent)
|
||||
$.globalEval 'self.close = function(){};'
|
||||
window.resizeTo 685, 320
|
||||
window.resizeBy 0, 350 - doc.clientHeight
|
||||
location.replace url
|
||||
return
|
||||
link = $.el 'a',
|
||||
@ -30,5 +30,5 @@ Report =
|
||||
textContent: 'Report to fgts'
|
||||
$.on link, 'click', (e) ->
|
||||
unless e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
window.resizeTo 685, 320
|
||||
window.resizeBy 0, 350 - doc.clientHeight
|
||||
$.add d.body, [$.tn(' ['), link, $.tn(']')]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user