From ab530c15b0eea02963a9a61cf900b1b238b7781f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 14 Nov 2015 12:13:22 -0800 Subject: [PATCH] Replace Pass ad in reporting form / error message with complaint link. #591 --- src/Miscellaneous/Report.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee index c276bc060..aa1632436 100755 --- a/src/Miscellaneous/Report.coffee +++ b/src/Miscellaneous/Report.coffee @@ -9,7 +9,17 @@ Report = ready: -> $.addStyle Report.css + Report.archive() if Conf['Archive Report'] + + if (passAd = $ 'a[href="https://www.4chan.org/pass"]') + $.extend passAd, + textContent: 'Complain' + href: 'https://www.4chan-x.net/captchas.html' + passAd.parentNode.normalize() + if (prev = passAd.previousSibling)?.nodeType is Node.TEXT_NODE + prev.nodeValue = prev.nodeValue.replace /4chan Pass[^\.]*\./i, 'reCAPTCHA malfunctioning?' + if Conf['Use Recaptcha v2 in Reports'] and $.hasClass doc, 'js-enabled' new MutationObserver(-> Report.fit 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'