From 91aa12f8fd41ac2f7096ad55df357324b52a4118 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 13 Jun 2016 03:59:02 -0700 Subject: [PATCH] Remove `Archive Report` option since fgts.jp and its report form no longer exists. #933 --- src/Archive/Redirect.coffee | 5 ----- src/Menu/ReportLink.coffee | 4 ---- src/Miscellaneous/Report.coffee | 25 ------------------------- src/config/Config.coffee | 4 ---- 4 files changed, 38 deletions(-) diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index 59efb05b4..12821e8e5 100644 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -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 diff --git a/src/Menu/ReportLink.coffee b/src/Menu/ReportLink.coffee index 590767032..7b026f7c1 100644 --- a/src/Menu/ReportLink.coffee +++ b/src/Menu/ReportLink.coffee @@ -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 diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee index 026699bb0..bdf501233 100644 --- a/src/Miscellaneous/Report.coffee +++ b/src/Miscellaneous/Report.coffee @@ -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 diff --git a/src/config/Config.coffee b/src/config/Config.coffee index f3be79a17..f1b186248 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -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.'