From 52e948c7bdd1cc9f1a6e2c064cad3ce1349bb635 Mon Sep 17 00:00:00 2001 From: ken Date: Wed, 26 Aug 2026 16:27:54 +0800 Subject: [PATCH] update --- assets/javascripts/app.js | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index aa4318c..1632f70 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -1515,48 +1515,48 @@ $(function() { removeHiddenElementsInsideBrand(); }, 600); //修正 Alt+M 定位點位置 - $(function() { - var $accessKeyM = $('#accesskey_menu'); - var $navbarHeader = $('.navbar-brand'); - var $modulesMenu = $('.modules-menu'); + // $(function() { + // var $accessKeyM = $('#accesskey_menu'); + // var $navbarHeader = $('.navbar-brand'); + // var $modulesMenu = $('.modules-menu'); - function fixAccessKeyM() { - var windowWidth = $(window).width(); + // function fixAccessKeyM() { + // var windowWidth = $(window).width(); - if (windowWidth > 769) { - // 大螢幕:移到 .navbar-brand 前面 - if ($navbarHeader.length > 0) { - $accessKeyM.insertBefore($navbarHeader); - $accessKeyM.css({ - 'display' : 'inline-block', - 'position' : 'relative', - 'float' : 'left', - }); - } - } else { - // 小螢幕:移回 .modules-menu 第一個位置 - if ($modulesMenu.length > 0) { - $accessKeyM.prependTo($modulesMenu); - $accessKeyM.css({ - 'display' : '', - 'position' : '', - 'float' : '', - 'left' : '', - }); - } - } - } + // if (windowWidth > 769) { + // // 大螢幕:移到 .navbar-brand 前面 + // if ($navbarHeader.length > 0) { + // $accessKeyM.insertBefore($navbarHeader); + // $accessKeyM.css({ + // 'display' : 'inline-block', + // 'position' : 'relative', + // 'float' : 'left', + // }); + // } + // } else { + // // 小螢幕:移回 .modules-menu 第一個位置 + // if ($modulesMenu.length > 0) { + // $accessKeyM.prependTo($modulesMenu); + // $accessKeyM.css({ + // 'display' : '', + // 'position' : '', + // 'float' : '', + // 'left' : '', + // }); + // } + // } + // } - // 初始執行 - setTimeout(fixAccessKeyM, 500); + // // 初始執行 + // setTimeout(fixAccessKeyM, 500); - // resize 監聽,加 debounce 避免頻繁觸發 - var resizeTimer; - $(window).on('resize', function() { - clearTimeout(resizeTimer); - resizeTimer = setTimeout(fixAccessKeyM, 150); - }); - }); + // // resize 監聽,加 debounce 避免頻繁觸發 + // var resizeTimer; + // $(window).on('resize', function() { + // clearTimeout(resizeTimer); + // resizeTimer = setTimeout(fixAccessKeyM, 150); + // }); + // }); //導覽選單子選單無障礙狀態修正 (支援多層級) function fixNavMenuA11y() {