this should get width fitting working again
hopefully it doesn't break anything else
This commit is contained in:
parent
0f38b9c467
commit
98514dd986
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -719,7 +719,7 @@ span.hide-announcement {
|
|||||||
.full-image:not(#ihover) {
|
.full-image:not(#ihover) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.expanded-image > .post > .file .full-image:not(#ihover) {
|
.expanded-image > .post > .file > .fileThumb > .full-image:not(#ihover) {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.expanding {
|
.expanding {
|
||||||
@ -731,7 +731,7 @@ span.hide-announcement {
|
|||||||
:root.fit-width .full-image:not(#ihover) {
|
:root.fit-width .full-image:not(#ihover) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
:root.gecko.fit-width .full-image {
|
:root.gecko.fit-width .full-image:not(#ihover) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
#ihover {
|
#ihover {
|
||||||
|
|||||||
@ -28,8 +28,10 @@ ImageExpand =
|
|||||||
cb:
|
cb:
|
||||||
toggle: (e) ->
|
toggle: (e) ->
|
||||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||||
|
post = Get.postFromNode @
|
||||||
|
return if post.file.isExpanded and post.file.fullImage?.controls
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
ImageExpand.toggle Get.postFromNode @
|
ImageExpand.toggle post
|
||||||
|
|
||||||
toggleAll: ->
|
toggleAll: ->
|
||||||
$.event 'CloseMenu'
|
$.event 'CloseMenu'
|
||||||
@ -92,9 +94,11 @@ ImageExpand =
|
|||||||
contract: (post) ->
|
contract: (post) ->
|
||||||
if post.file.isVideo and video = post.file.fullImage
|
if post.file.isVideo and video = post.file.fullImage
|
||||||
video.pause()
|
video.pause()
|
||||||
|
TrashQueue.add video, post
|
||||||
|
post.file.thumb.parentNode.href = video.src
|
||||||
|
post.file.thumb.parentNode.target = '_blank'
|
||||||
for eventName, cb of ImageExpand.videoCB
|
for eventName, cb of ImageExpand.videoCB
|
||||||
$.off video, eventName, cb
|
$.off video, eventName, cb
|
||||||
TrashQueue.add video, post
|
|
||||||
post.file.videoControls?.map($.rm)
|
post.file.videoControls?.map($.rm)
|
||||||
delete post.file.videoControls
|
delete post.file.videoControls
|
||||||
$.rmClass post.nodes.root, 'expanded-image'
|
$.rmClass post.nodes.root, 'expanded-image'
|
||||||
@ -115,8 +119,7 @@ ImageExpand =
|
|||||||
el.loop = true if isVideo
|
el.loop = true if isVideo
|
||||||
$.on el, 'error', ImageExpand.error
|
$.on el, 'error', ImageExpand.error
|
||||||
el.src = src or post.file.URL
|
el.src = src or post.file.URL
|
||||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
$.after thumb, el unless el is thumb.nextSibling
|
||||||
$.after position, el unless el is position.nextSibling
|
|
||||||
$.asap (-> if isVideo then el.videoHeight else el.naturalHeight), ->
|
$.asap (-> if isVideo then el.videoHeight else el.naturalHeight), ->
|
||||||
ImageExpand.completeExpand post
|
ImageExpand.completeExpand post
|
||||||
|
|
||||||
@ -150,6 +153,8 @@ ImageExpand =
|
|||||||
{file} = post
|
{file} = post
|
||||||
video = file.fullImage
|
video = file.fullImage
|
||||||
file.videoControls = []
|
file.videoControls = []
|
||||||
|
file.thumb.parentNode.removeAttribute 'href'
|
||||||
|
file.thumb.parentNode.removeAttribute 'target'
|
||||||
video.muted = !Conf['Allow Sound']
|
video.muted = !Conf['Allow Sound']
|
||||||
video.controls = Conf['Show Controls']
|
video.controls = Conf['Show Controls']
|
||||||
if Conf['Show Controls']
|
if Conf['Show Controls']
|
||||||
|
|||||||
@ -21,8 +21,7 @@ ImageHover =
|
|||||||
post.file.fullImage = el
|
post.file.fullImage = el
|
||||||
{thumb} = post.file
|
{thumb} = post.file
|
||||||
if d.body.contains thumb
|
if d.body.contains thumb
|
||||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
$.after thumb, el unless el is thumb.nextSibling
|
||||||
$.after position, el unless el is position.nextSibling
|
|
||||||
else
|
else
|
||||||
$.add Header.hover, el if el.parentNode isnt Header.hover
|
$.add Header.hover, el if el.parentNode isnt Header.hover
|
||||||
el.id = 'ihover'
|
el.id = 'ihover'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user