only preload in threads

This commit is contained in:
James Campos 2011-03-12 08:10:51 -08:00
parent f658e7baab
commit c05b5e7859
2 changed files with 22 additions and 23 deletions

View File

@ -1588,21 +1588,6 @@
return _results;
});
}
if (getConfig('Image Preloading')) {
g.callbacks.push(function(root) {
var parent, thumb, thumbs, _i, _len, _results;
thumbs = $$('img[md5]', root);
_results = [];
for (_i = 0, _len = thumbs.length; _i < _len; _i++) {
thumb = thumbs[_i];
parent = thumb.parentNode;
_results.push(el = n('img', {
src: parent.href
}));
}
return _results;
});
}
if (getConfig('Localize Time')) {
g.callbacks.push(function(root) {
var date, day, dotw, hour, min_sec, month, s, span, spans, year, _i, _len, _ref, _results;
@ -1803,6 +1788,21 @@
d.addEventListener('keypress', keypress, true);
}
if (g.REPLY) {
if (getConfig('Image Preloading')) {
g.callbacks.push(function(root) {
var parent, thumb, thumbs, _i, _len, _results;
thumbs = $$('img[md5]', root);
_results = [];
for (_i = 0, _len = thumbs.length; _i < _len; _i++) {
thumb = thumbs[_i];
parent = thumb.parentNode;
_results.push(el = n('img', {
src: parent.href
}));
}
return _results;
});
}
if (getConfig('Thread Updater')) {
updaterMake();
}

View File

@ -698,7 +698,7 @@ quickReply = (link, text) ->
inBefore submit, auto
mv clone, qr
mv qr, d.body
qr.style.width = qr.offsetWidth
qr.style.width = qr.offsetWidth #lock
$('input[title=autohide]:checked', qr)?.click()
textarea = $('textarea', qr)
@ -1211,13 +1211,6 @@ if getConfig 'Image Expansion'
thumb.parentNode.addEventListener 'click', imageClick, true
if g.expand then imageToggle thumb.parentNode
if getConfig 'Image Preloading'
g.callbacks.push (root) ->
thumbs = $$ 'img[md5]', root
for thumb in thumbs
parent = thumb.parentNode
el = n 'img', src: parent.href
if getConfig 'Localize Time'
g.callbacks.push (root) ->
spans = $$ 'span[id^=no]', root
@ -1360,6 +1353,12 @@ if getConfig 'Keybinds'
d.addEventListener 'keypress', keypress, true
if g.REPLY
if getConfig 'Image Preloading'
g.callbacks.push (root) ->
thumbs = $$ 'img[md5]', root
for thumb in thumbs
parent = thumb.parentNode
el = n 'img', src: parent.href
if getConfig 'Thread Updater'
updaterMake()
if getConfig('Quick Reply') and getConfig 'Persistent QR'