1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-10 00:30:09 +00:00

Remove fullscreen button, when fullscreen is not supported

This commit is contained in:
Tim Düsterhus 2012-06-17 17:37:58 +02:00
parent a95896ae28
commit fc378725e7

View File

@ -172,6 +172,7 @@ window.console ?=
icon.attr 'src', icon.attr('src').replace /disabled(Inverse)?.([a-z]{3})$/, 'enabled$1.$2' icon.attr 'src', icon.attr('src').replace /disabled(Inverse)?.([a-z]{3})$/, 'enabled$1.$2'
element.attr 'title', element.data 'disableMessage' element.attr 'title', element.data 'disableMessage'
if document.fullscreen or document.mozFullScreen or document.webkitIsFullScreen
# Enable fullscreen-mode on #main # Enable fullscreen-mode on #main
$('#timsChatFullscreen').click (event) -> $('#timsChatFullscreen').click (event) ->
if $(@).data 'status' if $(@).data 'status'
@ -194,7 +195,9 @@ window.console ?=
$(document).on 'fullscreenchange mozfullscreenchange webkitfullscreenchange', (event) -> $(document).on 'fullscreenchange mozfullscreenchange webkitfullscreenchange', (event) ->
if $('#timsChatFullscreen').data 'status' if $('#timsChatFullscreen').data 'status'
unless document.fullscreen or document.mozFullScreen or document.webkitIsFullScreen unless document.fullscreen or document.mozFullScreen or document.webkitIsFullScreen
$('#timsChatFullscreen').click(); $('#timsChatFullscreen').click()
else
$('#timsChatFullscreen').remove()
# Immediatly scroll down when activating autoscroll # Immediatly scroll down when activating autoscroll
$('#timsChatAutoscroll').click (event) -> $('#timsChatAutoscroll').click (event) ->