From eaa68c243ad518cea600c3194a954fc23bf9aa21 Mon Sep 17 00:00:00 2001 From: jelveh Date: Mon, 4 May 2026 18:56:51 -0700 Subject: [PATCH] Remove fullscreen button and handlers --- src/gui/src/UI/UIDesktop.js | 45 ------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index 22d8e72bc..dd7ab2c02 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -1193,11 +1193,6 @@ async function UIDesktop (options) { // github ht += ``; - // do not show the fullscreen button on mobile devices since it's broken - if ( ! isMobile.phone ) { - // fullscreen button - ht += `
`; - } // qr code button -- only show if not embedded if ( ! window.is_embedded ) @@ -2266,31 +2261,6 @@ $(document).on('click', '.user-options-menu-btn', async function (e) { }); }); -$(document).on('click', '.fullscreen-btn', async function (e) { - if ( ! window.is_fullscreen() ) { - var elem = document.documentElement; - if ( elem.requestFullscreen ) { - elem.requestFullscreen(); - } else if ( elem.webkitRequestFullscreen ) { /* Safari */ - elem.webkitRequestFullscreen(); - } else if ( elem.mozRequestFullScreen ) { /* moz */ - elem.mozRequestFullScreen(); - } else if ( elem.msRequestFullscreen ) { /* IE11 */ - elem.msRequestFullscreen(); - } - } - else { - if ( document.exitFullscreen ) { - document.exitFullscreen(); - } else if ( document.webkitExitFullscreen ) { - document.webkitExitFullscreen(); - } else if ( document.mozCancelFullScreen ) { - document.mozCancelFullScreen(); - } else if ( document.msExitFullscreen ) { - document.msExitFullscreen(); - } - } -}); $(document).on('click', '.close-launch-popover', function () { $('.launch-popover').closest('.popover').fadeOut(200, function () { @@ -2408,21 +2378,6 @@ $(document).on('click', '.launch-search-clear', function (e) { $('.launch-search').focus(); }); -document.addEventListener('fullscreenchange', (event) => { - // document.fullscreenElement will point to the element that - // is in fullscreen mode if there is one. If there isn't one, - // the value of the property is null. - - if ( document.fullscreenElement ) { - $('.fullscreen-btn').css('background-image', `url(${window.icons['shrink.svg']})`); - $('.fullscreen-btn').attr('title', i18n('desktop_exit_full_screen')); - window.user_preferences.clock_visible === 'auto' && $('#clock').show(); - } else { - $('.fullscreen-btn').css('background-image', `url(${window.icons['fullscreen.svg']})`); - $('.fullscreen-btn').attr('title', i18n('desktop_enter_full_screen')); - window.user_preferences.clock_visible === 'auto' && $('#clock').hide(); - } -}); window.set_desktop_background = function (options) { if ( options.fit ) {