This commit is contained in:
James Campos 2010-10-20 03:38:41 -07:00
parent 9725dd2ece
commit 777fb09f39
2 changed files with 10 additions and 9 deletions

View File

@ -17,7 +17,7 @@ config =
'Auto Watch': true 'Auto Watch': true
'Anonymize': false 'Anonymize': false
#TODO - add 'hidden' configs #TODO - expose 'hidden' configs
AEOS = AEOS =
init: -> init: ->
@ -214,7 +214,7 @@ iframeLoop = false
callbacks = [] callbacks = []
#godammit moot #godammit moot
head = $('head', d) head = $('head', d)
if not favicon = $('link[rel="shortcut icon"]', head)#/f/ unless favicon = $('link[rel="shortcut icon"]', head)#/f/
favicon = n 'link', { favicon = n 'link', {
rel: 'shortcut icon' rel: 'shortcut icon'
href: 'http://static.4chan.org/image/favicon.ico' href: 'http://static.4chan.org/image/favicon.ico'
@ -493,12 +493,12 @@ quickReply = (e) ->
#make quick reply dialog #make quick reply dialog
qr = AEOS.makeDialog 'qr', 'topleft' qr = AEOS.makeDialog 'qr', 'topleft'
div = n 'div', { titlebar = n 'div', {
innerHTML: 'Quick Reply ' innerHTML: 'Quick Reply '
className: 'move' className: 'move'
listener: ['mousedown', AEOS.move] listener: ['mousedown', AEOS.move]
} }
addTo qr, div addTo qr, titlebar
autohideB = n 'input', { autohideB = n 'input', {
type: 'checkbox' type: 'checkbox'
@ -512,7 +512,7 @@ quickReply = (e) ->
title: 'close' title: 'close'
listener: ['click', close] listener: ['click', close]
} }
addTo div, autohideB, tn(' '), closeB addTo titlebar, autohideB, tn(' '), closeB
form = $ 'form[name=post]' form = $ 'form[name=post]'
clone = form.cloneNode(true) clone = form.cloneNode(true)
@ -522,6 +522,7 @@ quickReply = (e) ->
clone.addEventListener('submit', submit, true) clone.addEventListener('submit', submit, true)
clone.target = 'iframe' clone.target = 'iframe'
if not REPLY if not REPLY
#figure out which thread we're replying to
xpath = 'preceding::span[@class="postername"][1]/preceding::input[1]' xpath = 'preceding::span[@class="postername"][1]/preceding::input[1]'
input = n 'input', { input = n 'input', {
type: 'hidden' type: 'hidden'

View File

@ -556,15 +556,15 @@
return (qr.className = klass); return (qr.className = klass);
}; };
quickReply = function(e) { 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'))) { if (!(qr = $('#qr'))) {
qr = AEOS.makeDialog('qr', 'topleft'); qr = AEOS.makeDialog('qr', 'topleft');
div = n('div', { titlebar = n('div', {
innerHTML: 'Quick Reply ', innerHTML: 'Quick Reply ',
className: 'move', className: 'move',
listener: ['mousedown', AEOS.move] listener: ['mousedown', AEOS.move]
}); });
addTo(qr, div); addTo(qr, titlebar);
autohideB = n('input', { autohideB = n('input', {
type: 'checkbox', type: 'checkbox',
className: 'pointer', className: 'pointer',
@ -577,7 +577,7 @@
title: 'close', title: 'close',
listener: ['click', close] listener: ['click', close]
}); });
addTo(div, autohideB, tn(' '), closeB); addTo(titlebar, autohideB, tn(' '), closeB);
form = $('form[name=post]'); form = $('form[name=post]');
clone = form.cloneNode(true); clone = form.cloneNode(true);
_ref2 = $$('script', clone); _ref2 = $$('script', clone);