Simplify File Info Formatting.
- Original file info always goes after reformatted file info so DownThemAll works. - Drop "Remove Original Link" option; no longer needed. - Reformatted file info goes outside span.fileText on /f/, leaving original as first, so embedding works.
This commit is contained in:
parent
6dcfd8709a
commit
b1feb2c0c2
@ -64,11 +64,6 @@ Config =
|
|||||||
true
|
true
|
||||||
'Reformat the file information.'
|
'Reformat the file information.'
|
||||||
]
|
]
|
||||||
'Remove Original Link': [
|
|
||||||
false
|
|
||||||
'Remove the original file link rather than hiding it. May cause incompatibilities with other scripts.'
|
|
||||||
1
|
|
||||||
]
|
|
||||||
'Thread Expansion': [
|
'Thread Expansion': [
|
||||||
true
|
true
|
||||||
'Add buttons to expand threads.'
|
'Add buttons to expand threads.'
|
||||||
|
|||||||
@ -946,6 +946,7 @@ span.hide-announcement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* File */
|
/* File */
|
||||||
|
.original-file-info,
|
||||||
.fnswitch:hover > .fntrunc,
|
.fnswitch:hover > .fntrunc,
|
||||||
.fnswitch:not(:hover) > .fnfull,
|
.fnswitch:not(:hover) > .fnfull,
|
||||||
.expanded-image > .post > .file > .fileThumb > video[data-md5],
|
.expanded-image > .post > .file > .fileThumb > video[data-md5],
|
||||||
|
|||||||
@ -9,21 +9,13 @@ FileInfo =
|
|||||||
node: ->
|
node: ->
|
||||||
return if !@file or @isClone
|
return if !@file or @isClone
|
||||||
|
|
||||||
info = $.el 'span', className: 'file-info'
|
oldInfo = $.el 'span', {className: 'original-file-info'}
|
||||||
FileInfo.format Conf['fileInfo'], @, info
|
$.prepend @file.link.parentNode, oldInfo
|
||||||
|
$.add oldInfo, [@file.link.previousSibling, @file.link, @file.link.nextSibling]
|
||||||
|
|
||||||
if Conf['Remove Original Link'] and not (@board.ID is 'f' and Conf['Enable Native Flash Embedding'])
|
info = $.el 'span', {className: 'file-info'}
|
||||||
{parentNode} = @file.link
|
FileInfo.format Conf['fileInfo'], @, info
|
||||||
$.rmAll parentNode
|
$.prepend @file.text, info
|
||||||
$.add parentNode, info
|
|
||||||
else
|
|
||||||
@file.link.previousSibling.nodeValue = ''
|
|
||||||
@file.link.hidden = true
|
|
||||||
{nextSibling} = @file.link
|
|
||||||
wrapper = $.el 'span', {hidden: true}
|
|
||||||
$.replace nextSibling, wrapper
|
|
||||||
$.add wrapper, nextSibling
|
|
||||||
$.after wrapper, info
|
|
||||||
|
|
||||||
format: (formatString, post, outputNode) ->
|
format: (formatString, post, outputNode) ->
|
||||||
output = []
|
output = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user