From cd4901d0a5e91c702843c7a4fcd6c48505c5a87d Mon Sep 17 00:00:00 2001 From: newtextdoc1111 Date: Tue, 13 May 2025 19:35:16 +0900 Subject: [PATCH] fix: Remove unused methods from TagData class --- web/js/data.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/web/js/data.js b/web/js/data.js index c868a71..3e337e4 100644 --- a/web/js/data.js +++ b/web/js/data.js @@ -36,28 +36,6 @@ export class TagData { /** @type {number} */ this.count = count; } - - /** - * Get display label for the tag - * @returns {string} Formatted tag label - */ - getLabel() { - return `${this.tag} (${this.count})`; - } - - /** - * Check if this tag matches a search query - * @param {string} query - The search query - * @returns {boolean} True if this tag or any of its aliases match the query - */ - matches(query) { - if (!query) return false; - - const lowerQuery = query.toLowerCase(); - if (this.tag.toLowerCase().includes(lowerQuery)) return true; - - return this.alias.some(a => a.toLowerCase().includes(lowerQuery)); - } } // Data storage @@ -67,6 +45,7 @@ export const autoCompleteData = { /** @type {Map} */ tagMap: new Map(), // Stores tag data, mapping tag names to TagData objects + /** @type {Map} */ aliasMap: new Map(), // Maps aliases to their main tag names