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
|
el: a
|
||||||
order: 10
|
order: 10
|
||||||
open: (post) ->
|
open: (post) ->
|
||||||
ReportLink.url = unless post.isDead
|
unless post.isDead or (post.thread.isDead and not post.thread.isArchived)
|
||||||
"//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
ReportLink.url = "//sys.4chan.org/#{post.board}/imgboard.php?mode=report&no=#{post}"
|
||||||
|
ReportLink.height = 200
|
||||||
else if Conf['Archive Report']
|
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
|
!!ReportLink.url
|
||||||
|
|
||||||
report: ->
|
report: ->
|
||||||
{url} = ReportLink
|
{url, height} = ReportLink
|
||||||
id = Date.now()
|
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
|
window.open url, id, set
|
||||||
|
|||||||
@ -22,7 +22,7 @@ Report =
|
|||||||
|
|
||||||
if (message = $ 'h3') and /Report submitted!/.test(message.textContent)
|
if (message = $ 'h3') and /Report submitted!/.test(message.textContent)
|
||||||
$.globalEval 'self.close = function(){};'
|
$.globalEval 'self.close = function(){};'
|
||||||
window.resizeTo 685, 320
|
window.resizeBy 0, 350 - doc.clientHeight
|
||||||
location.replace url
|
location.replace url
|
||||||
return
|
return
|
||||||
link = $.el 'a',
|
link = $.el 'a',
|
||||||
@ -30,5 +30,5 @@ Report =
|
|||||||
textContent: 'Report to fgts'
|
textContent: 'Report to fgts'
|
||||||
$.on link, 'click', (e) ->
|
$.on link, 'click', (e) ->
|
||||||
unless e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
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(']')]
|
$.add d.body, [$.tn(' ['), link, $.tn(']')]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user