Fix scroll wheel volume adjustment on /r/ and /wsr/. Also read list of boards allowing audio from 4chan's boards.json.
This commit is contained in:
parent
1641aeacfd
commit
fdfbc10cb2
@ -41,3 +41,7 @@ BoardConfig =
|
|||||||
|
|
||||||
sfwBoards: (sfw) ->
|
sfwBoards: (sfw) ->
|
||||||
board for board, data of (@boards or Conf['boardConfig'].boards) when !!data.ws_board is sfw
|
board for board, data of (@boards or Conf['boardConfig'].boards) when !!data.ws_board is sfw
|
||||||
|
|
||||||
|
noAudio: (boardID) ->
|
||||||
|
boards = @boards or Conf['boardConfig'].boards
|
||||||
|
boards and !boards[boardID].webm_audio
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Volume =
|
|||||||
name: 'Mouse Wheel Volume'
|
name: 'Mouse Wheel Volume'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
return unless g.BOARD.ID in ['gif', 'wsg', 'r', 'wsr']
|
return if BoardConfig.noAudio(g.BOARD.ID)
|
||||||
|
|
||||||
if Conf['Mouse Wheel Volume']
|
if Conf['Mouse Wheel Volume']
|
||||||
Callbacks.CatalogThread.push
|
Callbacks.CatalogThread.push
|
||||||
@ -60,7 +60,7 @@ Volume =
|
|||||||
Volume.inputs.volume.value = volume
|
Volume.inputs.volume.value = volume
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
return unless @board.ID in ['gif', 'wsg'] and @file?.isVideo
|
return unless !BoardConfig.noAudio(@board.ID) and @file?.isVideo
|
||||||
$.on @file.thumb, 'wheel', Volume.wheel.bind(Header.hover)
|
$.on @file.thumb, 'wheel', Volume.wheel.bind(Header.hover)
|
||||||
$.on ($('.file-info', @file.text) or @file.link), 'wheel', Volume.wheel.bind(@file.thumbLink)
|
$.on ($('.file-info', @file.text) or @file.link), 'wheel', Volume.wheel.bind(@file.thumbLink)
|
||||||
|
|
||||||
|
|||||||
@ -265,7 +265,7 @@ QR.post = class
|
|||||||
@fileError 'Video lacks duration metadata (try remuxing)'
|
@fileError 'Video lacks duration metadata (try remuxing)'
|
||||||
else if duration > QR.max_duration_video
|
else if duration > QR.max_duration_video
|
||||||
@fileError "Video too long (video: #{duration}s, max: #{QR.max_duration_video}s)"
|
@fileError "Video too long (video: #{duration}s, max: #{QR.max_duration_video}s)"
|
||||||
if g.BOARD.ID not in ['gif', 'wsg', 'r', 'wsr'] and $.hasAudio el
|
if BoardConfig.noAudio(g.BOARD.ID) and $.hasAudio(el)
|
||||||
@fileError 'Audio not allowed'
|
@fileError 'Audio not allowed'
|
||||||
|
|
||||||
setThumbnail: (el) ->
|
setThumbnail: (el) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user