From 777fb09f39ada4613b4205a02d59edc9f6e54136 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 20 Oct 2010 03:38:41 -0700 Subject: [PATCH] tweaks --- 4chan_x.coffee | 11 ++++++----- 4chan_x.js | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/4chan_x.coffee b/4chan_x.coffee index 993d5fb1c..01b22866c 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -17,7 +17,7 @@ config = 'Auto Watch': true 'Anonymize': false -#TODO - add 'hidden' configs +#TODO - expose 'hidden' configs AEOS = init: -> @@ -214,7 +214,7 @@ iframeLoop = false callbacks = [] #godammit moot head = $('head', d) -if not favicon = $('link[rel="shortcut icon"]', head)#/f/ +unless favicon = $('link[rel="shortcut icon"]', head)#/f/ favicon = n 'link', { rel: 'shortcut icon' href: 'http://static.4chan.org/image/favicon.ico' @@ -493,12 +493,12 @@ quickReply = (e) -> #make quick reply dialog qr = AEOS.makeDialog 'qr', 'topleft' - div = n 'div', { + titlebar = n 'div', { innerHTML: 'Quick Reply ' className: 'move' listener: ['mousedown', AEOS.move] } - addTo qr, div + addTo qr, titlebar autohideB = n 'input', { type: 'checkbox' @@ -512,7 +512,7 @@ quickReply = (e) -> title: 'close' listener: ['click', close] } - addTo div, autohideB, tn(' '), closeB + addTo titlebar, autohideB, tn(' '), closeB form = $ 'form[name=post]' clone = form.cloneNode(true) @@ -522,6 +522,7 @@ quickReply = (e) -> clone.addEventListener('submit', submit, true) clone.target = 'iframe' if not REPLY + #figure out which thread we're replying to xpath = 'preceding::span[@class="postername"][1]/preceding::input[1]' input = n 'input', { type: 'hidden' diff --git a/4chan_x.js b/4chan_x.js index f846fa6a6..19f176321 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -556,15 +556,15 @@ return (qr.className = klass); }; quickReply = function(e) { - var _i, _len, _ref2, _ref3, autohideB, clone, closeB, div, form, input, qr, script, selection, text, textarea, xpath; + var _i, _len, _ref2, _ref3, autohideB, clone, closeB, form, input, qr, script, selection, text, textarea, titlebar, xpath; if (!(qr = $('#qr'))) { qr = AEOS.makeDialog('qr', 'topleft'); - div = n('div', { + titlebar = n('div', { innerHTML: 'Quick Reply ', className: 'move', listener: ['mousedown', AEOS.move] }); - addTo(qr, div); + addTo(qr, titlebar); autohideB = n('input', { type: 'checkbox', className: 'pointer', @@ -577,7 +577,7 @@ title: 'close', listener: ['click', close] }); - addTo(div, autohideB, tn(' '), closeB); + addTo(titlebar, autohideB, tn(' '), closeB); form = $('form[name=post]'); clone = form.cloneNode(true); _ref2 = $$('script', clone);