Fix image expanding fitness with an inlined backlink on Firefox, close #26
This commit is contained in:
parent
ce1daf656e
commit
688cf8aa13
@ -2873,15 +2873,15 @@
|
||||
return $.rm(thumb.nextSibling);
|
||||
},
|
||||
expand: function(thumb) {
|
||||
var a, filesize, img, max, _, _ref;
|
||||
var a, filesize, img, max;
|
||||
a = thumb.parentNode;
|
||||
img = $.el('img', {
|
||||
src: a.href
|
||||
});
|
||||
if (engine === 'gecko' && a.parentNode.className !== 'op') {
|
||||
filesize = $('.filesize', a.parentNode);
|
||||
_ref = filesize.textContent.match(/(\d+)x/), _ = _ref[0], max = _ref[1];
|
||||
img.style.maxWidth = "" + max + "px";
|
||||
filesize = $.x('preceding-sibling::span[@class="filesize"]', a).textContent;
|
||||
max = filesize.match(/(\d+)x/);
|
||||
img.style.maxWidth = "" + max[1] + "px";
|
||||
}
|
||||
$.on(img, 'error', imgExpand.error);
|
||||
thumb.hidden = true;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
master
|
||||
- mayhem
|
||||
change 'Duckroll' for 'Cross-thread'
|
||||
fix image expanding fitness with an inlined backlink on Firefox
|
||||
|
||||
2.22.0
|
||||
- mayhem
|
||||
|
||||
@ -2208,9 +2208,9 @@ imgExpand =
|
||||
img = $.el 'img',
|
||||
src: a.href
|
||||
if engine is 'gecko' and a.parentNode.className isnt 'op'
|
||||
filesize = $ '.filesize', a.parentNode
|
||||
[_, max] = filesize.textContent.match /(\d+)x/
|
||||
img.style.maxWidth = "#{max}px"
|
||||
filesize = $.x('preceding-sibling::span[@class="filesize"]', a).textContent
|
||||
max = filesize.match /(\d+)x/
|
||||
img.style.maxWidth = "#{max[1]}px"
|
||||
$.on img, 'error', imgExpand.error
|
||||
thumb.hidden = true
|
||||
$.add a, img
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user