Remove Archive Report option since fgts.jp and its report form no longer exists. #933
This commit is contained in:
parent
9abfa6ea72
commit
91aa12f8fd
@ -16,7 +16,6 @@ Redirect =
|
||||
thread: {}
|
||||
post: {}
|
||||
file: {}
|
||||
report: {}
|
||||
|
||||
archives = {}
|
||||
for data in Conf['archives']
|
||||
@ -29,7 +28,6 @@ Redirect =
|
||||
o.thread[boardID] = data unless boardID of o.thread
|
||||
o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka'
|
||||
o.file[boardID] = data unless boardID of o.file or boardID not in files
|
||||
o.report[boardID] = data if name is 'fgts'
|
||||
|
||||
for boardID, record of Conf['selectedArchives']
|
||||
for type, id of record when (archive = archives[JSON.stringify id])
|
||||
@ -151,9 +149,6 @@ Redirect =
|
||||
"#{boardID}/?task=search2&search_#{type}=#{value}"
|
||||
"#{Redirect.protocol archive}#{archive.domain}/#{path}"
|
||||
|
||||
report: (archive, {boardID, postID}) ->
|
||||
"https://so.fgts.jp/report/?board=#{boardID}&no=#{postID}"
|
||||
|
||||
securityCheck: (url) ->
|
||||
/^https:\/\//.test(url) or
|
||||
location.protocol is 'http:' or
|
||||
|
||||
@ -19,10 +19,6 @@ ReportLink =
|
||||
ReportLink.dims = 'width=350,height=275'
|
||||
else
|
||||
ReportLink.dims = 'width=400,height=550'
|
||||
else if Conf['Archive Report']
|
||||
a.textContent = 'Report to archive'
|
||||
ReportLink.url = Redirect.to 'report', {boardID: post.board.ID, postID: post.ID}
|
||||
ReportLink.dims = 'width=700,height=475'
|
||||
else
|
||||
ReportLink.url = ''
|
||||
!!ReportLink.url
|
||||
|
||||
@ -8,8 +8,6 @@ Report =
|
||||
ready: ->
|
||||
$.addStyle CSS.report
|
||||
|
||||
Report.archive() if Conf['Archive Report']
|
||||
|
||||
if not Conf['Use Recaptcha v1 in Reports'] and not Conf['Force Noscript Captcha'] and Main.jsEnabled
|
||||
new MutationObserver(->
|
||||
Report.fit 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'
|
||||
@ -26,27 +24,4 @@ Report =
|
||||
dy = el.getBoundingClientRect().bottom - doc.clientHeight + 8
|
||||
window.resizeBy 0, dy if dy > 0
|
||||
|
||||
archive: ->
|
||||
Redirect.init()
|
||||
return unless (url = Redirect.to 'report', {boardID: g.BOARD.ID, postID: Report.postID})
|
||||
|
||||
if (message = $ 'h3') and /Report submitted!/.test(message.textContent)
|
||||
if location.hash is '#redirect'
|
||||
$.globalEval 'self.close = function(){};'
|
||||
window.resizeTo 700, 475
|
||||
location.replace url
|
||||
return
|
||||
|
||||
link = $.el 'a',
|
||||
href: url
|
||||
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.resizeTo 700, 475
|
||||
$.add d.body, [$.tn(' ['), link, $.tn(']')]
|
||||
|
||||
if types = $.id('reportTypes')
|
||||
$.on types, 'change', (e) ->
|
||||
$('form').action = if e.target.value is 'illegal' then '#redirect' else ''
|
||||
|
||||
return Report
|
||||
|
||||
@ -39,10 +39,6 @@ Config =
|
||||
true
|
||||
'Redirect dead threads and images to the archives.'
|
||||
]
|
||||
'Archive Report': [
|
||||
true
|
||||
'Enable reporting posts to supported archives.'
|
||||
]
|
||||
'Exempt Archives from Encryption': [
|
||||
true
|
||||
'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user