This commit is contained in:
James Campos 2011-03-12 08:20:48 -08:00
parent c05b5e7859
commit 8c31785b0e
2 changed files with 23 additions and 0 deletions

View File

@ -66,6 +66,7 @@
'Anonymize': [false, 'Make everybody anonymous'],
'Auto Watch': [true, 'Automatically watch threads that you start (Firefox only)'],
'Comment Expansion': [true, 'Expand too long comments'],
'Image Auto-Gif': [false, 'Animate gif thumbnails'],
'Image Expansion': [true, 'Expand images'],
'Image Preloading': [false, 'Preload Images'],
'Keybinds': [false, 'Binds actions to keys'],
@ -1588,6 +1589,19 @@
return _results;
});
}
if (getConfig('Image Auto-Gif')) {
g.callbacks.push(function(root) {
var src, thumb, thumbs, _i, _len, _results;
thumbs = $$('img[md5]', root);
_results = [];
for (_i = 0, _len = thumbs.length; _i < _len; _i++) {
thumb = thumbs[_i];
src = thumb.parentNode.href;
_results.push(/gif$/.test(src) ? thumb.src = src : void 0);
}
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;

View File

@ -12,6 +12,7 @@ config =
'Anonymize': [false, 'Make everybody anonymous']
'Auto Watch': [true, 'Automatically watch threads that you start (Firefox only)']
'Comment Expansion': [true, 'Expand too long comments']
'Image Auto-Gif': [false, 'Animate gif thumbnails']
'Image Expansion': [true, 'Expand images']
'Image Preloading': [false, 'Preload Images']
'Keybinds': [false, 'Binds actions to keys']
@ -1211,6 +1212,14 @@ if getConfig 'Image Expansion'
thumb.parentNode.addEventListener 'click', imageClick, true
if g.expand then imageToggle thumb.parentNode
if getConfig 'Image Auto-Gif'
g.callbacks.push (root) ->
thumbs = $$ 'img[md5]', root
for thumb in thumbs
src = thumb.parentNode.href
if /gif$/.test src
thumb.src = src
if getConfig 'Localize Time'
g.callbacks.push (root) ->
spans = $$ 'span[id^=no]', root