This commit is contained in:
ken 2026-09-03 14:01:52 +08:00
parent 238699ec30
commit 6c4e0407c5
1 changed files with 30 additions and 0 deletions

View File

@ -2,6 +2,36 @@
// ECMAScript 5 嚴格模式
'use strict';
$(function() {
var $signLanguageBox = $('.orbit-bar-search-sign-language');
var $headerNav = $('.header-nav');
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
// 移除 color: inherit !important
$target.each(function() {
$(this)[0].style.removeProperty('color');
});
function handleNavMove() {
var windowWidth = window.innerWidth;
if (windowWidth > 768) {
if ($signLanguageBox.length && $signLanguageBox.find('[accesskey="U"], [accesskey="W"]').length === 0) {
$signLanguageBox.prepend($target);
}
} else {
if ($headerNav.length && $headerNav.find('[accesskey="U"], [accesskey="W"]').length === 0) {
$headerNav.append($target);
}
}
}
handleNavMove();
$(window).on('resize', function() {
handleNavMove();
});
});
$(function() {
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
// 移除 color: inherit !important