only preload in threads
This commit is contained in:
parent
f658e7baab
commit
c05b5e7859
30
4chan_x.js
30
4chan_x.js
@ -1588,21 +1588,6 @@
|
|||||||
return _results;
|
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')) {
|
if (getConfig('Localize Time')) {
|
||||||
g.callbacks.push(function(root) {
|
g.callbacks.push(function(root) {
|
||||||
var date, day, dotw, hour, min_sec, month, s, span, spans, year, _i, _len, _ref, _results;
|
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);
|
d.addEventListener('keypress', keypress, true);
|
||||||
}
|
}
|
||||||
if (g.REPLY) {
|
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')) {
|
if (getConfig('Thread Updater')) {
|
||||||
updaterMake();
|
updaterMake();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -698,7 +698,7 @@ quickReply = (link, text) ->
|
|||||||
inBefore submit, auto
|
inBefore submit, auto
|
||||||
mv clone, qr
|
mv clone, qr
|
||||||
mv qr, d.body
|
mv qr, d.body
|
||||||
qr.style.width = qr.offsetWidth
|
qr.style.width = qr.offsetWidth #lock
|
||||||
|
|
||||||
$('input[title=autohide]:checked', qr)?.click()
|
$('input[title=autohide]:checked', qr)?.click()
|
||||||
textarea = $('textarea', qr)
|
textarea = $('textarea', qr)
|
||||||
@ -1211,13 +1211,6 @@ if getConfig 'Image Expansion'
|
|||||||
thumb.parentNode.addEventListener 'click', imageClick, true
|
thumb.parentNode.addEventListener 'click', imageClick, true
|
||||||
if g.expand then imageToggle thumb.parentNode
|
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'
|
if getConfig 'Localize Time'
|
||||||
g.callbacks.push (root) ->
|
g.callbacks.push (root) ->
|
||||||
spans = $$ 'span[id^=no]', root
|
spans = $$ 'span[id^=no]', root
|
||||||
@ -1360,6 +1353,12 @@ if getConfig 'Keybinds'
|
|||||||
d.addEventListener 'keypress', keypress, true
|
d.addEventListener 'keypress', keypress, true
|
||||||
|
|
||||||
if g.REPLY
|
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'
|
if getConfig 'Thread Updater'
|
||||||
updaterMake()
|
updaterMake()
|
||||||
if getConfig('Quick Reply') and getConfig 'Persistent QR'
|
if getConfig('Quick Reply') and getConfig 'Persistent QR'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user