Fix Auto-Gif reavealing spoilers. Fix Revealed Spoilers + Auto-Gif thumbnail dimensions, also fix dimensions for inlined OPs. What the fuck was I doing when I tried to fix that.
This commit is contained in:
parent
afd2ade4c5
commit
ddba287197
@ -3650,7 +3650,7 @@
|
||||
var img, src;
|
||||
if (post.root.hidden || !post.img) return;
|
||||
src = post.img.parentNode.href;
|
||||
if (/gif$/.test(src) && !/spoiler/.test(src)) {
|
||||
if (/gif$/.test(src) && !/spoiler/.test(post.img.src)) {
|
||||
img = $.el('img');
|
||||
$.on(img, 'load', function() {
|
||||
return post.img.src = src;
|
||||
@ -4301,15 +4301,15 @@ img[md5], img[md5] + img {\
|
||||
width: 100%;\
|
||||
}\
|
||||
/* revealed spoilers do not have height/width,\
|
||||
this fixed "expanded" auto-gifs */\
|
||||
this fixes "expanded" auto-gifs */\
|
||||
img[md5] {\
|
||||
max-height: 251px;\
|
||||
max-width: 251px;\
|
||||
}\
|
||||
td > .filesize > img[md5] {\
|
||||
max-height: 126px;\
|
||||
max-width: 126px;\
|
||||
}\
|
||||
.filesize:first-child ~ a > img[md5] {\
|
||||
max-height: 251px;\
|
||||
max-width: 251px;\
|
||||
}\
|
||||
\
|
||||
#qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {\
|
||||
position: fixed;\
|
||||
|
||||
@ -3037,7 +3037,7 @@ AutoGif =
|
||||
node: (post) ->
|
||||
return if post.root.hidden or not post.img
|
||||
src = post.img.parentNode.href
|
||||
if /gif$/.test(src) and !/spoiler/.test src
|
||||
if /gif$/.test(src) and !/spoiler/.test post.img.src
|
||||
img = $.el 'img'
|
||||
$.on img, 'load', ->
|
||||
# Replace the thumbnail once the GIF has finished loading.
|
||||
@ -3637,15 +3637,15 @@ img[md5], img[md5] + img {
|
||||
width: 100%;
|
||||
}
|
||||
/* revealed spoilers do not have height/width,
|
||||
this fixed "expanded" auto-gifs */
|
||||
this fixes "expanded" auto-gifs */
|
||||
img[md5] {
|
||||
max-height: 251px;
|
||||
max-width: 251px;
|
||||
}
|
||||
td > .filesize > img[md5] {
|
||||
max-height: 126px;
|
||||
max-width: 126px;
|
||||
}
|
||||
.filesize:first-child ~ a > img[md5] {
|
||||
max-height: 251px;
|
||||
max-width: 251px;
|
||||
}
|
||||
|
||||
#qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {
|
||||
position: fixed;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user