From 7a756dce2673ff9ef6889b4a7a3b42555369f14e Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 20 Sep 2011 19:50:55 -0700 Subject: [PATCH] autohide working --- 4chan_x.user.js | 4 ++-- script.coffee | 48 +++++++++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 51d7e3497..4618d278b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1363,7 +1363,7 @@ text = ''; } tid || (tid = g.THREAD_ID || ''); - QR.qr = qr = ui.dialog('qr', 'top: 0; left: 0;', " X
120 Captchas
" + (g.REPLY ? "" : '') + " " + QR.spoiler + "
"); + QR.qr = qr = ui.dialog('qr', 'top: 0; left: 0;', " X
120 Captchas
" + (g.REPLY ? "" : '') + " " + QR.spoiler + "
"); c = d.cookie; $('[name=name]', qr).value = (m = c.match(/4chan_name=([^;]+)/)) ? decodeURIComponent(m[1]) : ''; $('[name=email]', qr).value = (m = c.match(/4chan_email=([^;]+)/)) ? decodeURIComponent(m[1]) : ''; @@ -3114,7 +3114,7 @@ #qr form {\ margin: 0;\ }\ - #qr:not(:hover) #autohide:checked ~ form {\ + #qr:not(:hover) #autohide:checked ~ .autohide {\ height: 0;\ overflow: hidden;\ }\ diff --git a/script.coffee b/script.coffee index cd042876d..b2f80e9e8 100644 --- a/script.coffee +++ b/script.coffee @@ -1052,28 +1052,30 @@ QR = - -
-
- -
-
- 120 Captchas - -
-
- - #{if g.REPLY then "" else ''} - - #{QR.spoiler} -
- -
+
+ +
+
+ +
+
+ 120 Captchas + +
+
+ + #{if g.REPLY then "" else ''} + + #{QR.spoiler} +
+
+
+ " #$.bind $('#attach', qr), 'click', QR.attach #XXX use dom methods to set values instead of injecting raw user input into your html -_-; @@ -2448,7 +2450,7 @@ Main = #qr form { margin: 0; } - #qr:not(:hover) #autohide:checked ~ form { + #qr:not(:hover) #autohide:checked ~ .autohide { height: 0; overflow: hidden; }