From 7b0aa7ee77e5ca6f7286f7c383bb8f5dc55cd92a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 16 Jun 2015 10:33:14 -0700 Subject: [PATCH] Fix words being cut off in non-JS captcha. --- package.json | 2 ++ src/General/Main.coffee | 8 +++++++- src/General/css/noscript.css | 3 +++ src/General/css/www.css | 3 +++ src/Miscellaneous/Report.coffee | 2 +- 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/General/css/noscript.css create mode 100644 src/General/css/www.css diff --git a/package.json b/package.json index 43749d045..4d13fbb11 100755 --- a/package.json +++ b/package.json @@ -21,6 +21,8 @@ "*://sys.4chan.org/*", "*://a.4cdn.org/*", "*://i.4cdn.org/*", + "*://www.4chan.org/banned", + "*://www.4chan.org/feedback", "https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*", "https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*", "*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc" diff --git a/src/General/Main.coffee b/src/General/Main.coffee index a29e2f10e..c5a6fdf47 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -9,6 +9,10 @@ Main = $.ready -> Captcha.fixes.init() return + if location.hostname is 'www.4chan.org' + $.onExists d.documentElement, 'body', false, -> $.addStyle Main.cssWWW + return + g.threads = new SimpleDict() g.posts = new SimpleDict() @@ -301,7 +305,9 @@ Main = $.ready -> cb() if Main.isThisPageLegit() - css: `<%= importCSS('font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon') %>` + css: `<%= importCSS('font-awesome', 'noscript', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon') %>` + + cssWWW: `<%= importCSS('noscript', 'www') %>` features: [ ['Polyfill', Polyfill] diff --git a/src/General/css/noscript.css b/src/General/css/noscript.css new file mode 100644 index 000000000..648d901f3 --- /dev/null +++ b/src/General/css/noscript.css @@ -0,0 +1,3 @@ +noscript div:first-child, noscript iframe { + height: 422px !important; +} diff --git a/src/General/css/www.css b/src/General/css/www.css new file mode 100644 index 000000000..01b12c399 --- /dev/null +++ b/src/General/css/www.css @@ -0,0 +1,3 @@ +#captcha-cnt { + height: auto; +} diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee index 999c892eb..33f8e3d93 100755 --- a/src/Miscellaneous/Report.coffee +++ b/src/Miscellaneous/Report.coffee @@ -1,5 +1,5 @@ Report = - css: `<%= importCSS('report') %>` + css: `<%= importCSS('noscript', 'report') %>` init: -> return unless /\bmode=report\b/.test(location.search) and match = location.search.match /\bno=(\d+)/