replace document.createTextNode with tn

This commit is contained in:
James Campos 2010-10-19 21:43:25 -07:00
parent 7f685989be
commit b523134964
2 changed files with 8 additions and 18 deletions

View File

@ -529,15 +529,13 @@ quickReply = (e) ->
title: 'autohide' title: 'autohide'
listener: ['click', autohide] listener: ['click', autohide]
} }
div.appendChild(autohideB)
div.appendChild(document.createTextNode(' '))
closeB = n 'a', { closeB = n 'a', {
textContent: 'X' textContent: 'X'
className: 'pointer' className: 'pointer'
title: 'close' title: 'close'
listener: ['click', close] listener: ['click', close]
} }
div.appendChild(closeB) addTo div, autohideB, tn(' '), closeB
form = $ 'form[name=post]' form = $ 'form[name=post]'
clone = form.cloneNode(true) clone = form.cloneNode(true)
@ -612,14 +610,11 @@ watcherUpdate = ->
className: 'pointer' className: 'pointer'
listener: ['click', watchX] listener: ['click', watchX]
} }
div.appendChild(a)
div.appendChild(document.createTextNode(' '))
link = n 'a', { link = n 'a', {
textContent: thread.text textContent: thread.text
href: "/#{board}/res/#{thread.id}" href: "/#{board}/res/#{thread.id}"
} }
div.appendChild(link) addTo div, a, tn(' '), link, n('br')
div.appendChild(n 'br')
old = $('#watcher div:last-child') old = $('#watcher div:last-child')
replace(old, div) replace(old, div)
@ -758,7 +753,7 @@ a = n 'a', {
className: 'pointer' className: 'pointer'
listener: ['click', options] listener: ['click', options]
} }
inBefore(text, document.createTextNode(' / ')) inBefore(text, tn(' / '))
inBefore(text, a) inBefore(text, a)
#hack to tab from comment straight to recaptcha #hack to tab from comment straight to recaptcha
@ -811,7 +806,7 @@ if getConfig('Quick Report')
listener: ['click', report] listener: ['click', report]
} }
inAfter(el, a) inAfter(el, a)
inAfter(el, document.createTextNode(' ')) inAfter(el, tn(' '))
) )
if getConfig('Thread Watcher') if getConfig('Thread Watcher')

View File

@ -592,15 +592,13 @@
title: 'autohide', title: 'autohide',
listener: ['click', autohide] listener: ['click', autohide]
}); });
div.appendChild(autohideB);
div.appendChild(document.createTextNode(' '));
closeB = n('a', { closeB = n('a', {
textContent: 'X', textContent: 'X',
className: 'pointer', className: 'pointer',
title: 'close', title: 'close',
listener: ['click', close] listener: ['click', close]
}); });
div.appendChild(closeB); addTo(div, 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);
@ -681,14 +679,11 @@
className: 'pointer', className: 'pointer',
listener: ['click', watchX] listener: ['click', watchX]
}); });
div.appendChild(a);
div.appendChild(document.createTextNode(' '));
link = n('a', { link = n('a', {
textContent: thread.text, textContent: thread.text,
href: ("/" + (board) + "/res/" + (thread.id)) href: ("/" + (board) + "/res/" + (thread.id))
}); });
div.appendChild(link); addTo(div, a, tn(' '), link, n('br'));
div.appendChild(n('br'));
} }
} }
old = $('#watcher div:last-child'); old = $('#watcher div:last-child');
@ -851,7 +846,7 @@
className: 'pointer', className: 'pointer',
listener: ['click', options] listener: ['click', options]
}); });
inBefore(text, document.createTextNode(' / ')); inBefore(text, tn(' / '));
inBefore(text, a); inBefore(text, a);
_ref = $$('#recaptcha_table a'); _ref = $$('#recaptcha_table a');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@ -918,7 +913,7 @@
listener: ['click', report] listener: ['click', report]
}); });
inAfter(el, a); inAfter(el, a);
return inAfter(el, document.createTextNode(' ')); return inAfter(el, tn(' '));
})()); })());
} }
return _result; return _result;