Skip to content

Commit c5b2529

Browse files
authored
Add files via upload
1 parent 84651b0 commit c5b2529

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

test.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,6 @@ <h2>輸入法模式:</h2>
458458
const modeDisplay = document.getElementById('mode-display');
459459
const modeRadioButtons = document.querySelectorAll('input[name="input_mode"]');
460460

461-
const FULL_WIDTH_NUMBERS = ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩'];
462-
463461
const MAX_CODE_LENGTH = 3;
464462
const SHIFT_HOLD_THRESHOLD = 300; // 300毫秒
465463

@@ -947,17 +945,19 @@ <h2>輸入法模式:</h2>
947945
if (charToSearch.length === 1) {
948946
const codes = currentReverseCodemap[charToSearch];
949947
if (codes && codes.length > 0) {
950-
let formattedCodes = codes.map(formatCode);
951-
952-
if (formattedCodes.length > 1) {
953-
formattedCodes = formattedCodes.map((code, index) => {
954-
if (index < 10) {
955-
return `${code}${FULL_WIDTH_NUMBERS[index]}`;
948+
const formattedCodes = codes.map((code, index) => {
949+
let suffix = '';
950+
if (codes.length > 1) {
951+
if (index < 9) {
952+
suffix = (index + 1).toString();
953+
} else if (index === 9) {
954+
suffix = '0';
956955
} else {
957-
return `${code}>`;
956+
suffix = '>';
958957
}
959-
});
960-
}
958+
}
959+
return formatCode(code) + suffix;
960+
});
961961

962962
searchResult.textContent = `編碼: ${formattedCodes.join(' ')}`;
963963
} else {

0 commit comments

Comments
 (0)