From 8908306bec7488de06a5299372d7e6fb152102ce Mon Sep 17 00:00:00 2001 From: Cr4zyc4k3 <69073372+Cr4zyc4k3@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:27:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=EF=B8=8F[all]=20revert=20wrong=20r?= =?UTF-8?q?efactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/extendedBuilding/assets/enhanceVehicleList.ts | 2 +- .../assets/collapsableMissions/missionlist.ts | 2 +- src/modules/extendedCallList/assets/sort/callList.ts | 2 +- src/modules/generalExtensions/assets/clickableLinks.ts | 8 ++++---- src/modules/generalExtensions/assets/inputMaxLen.ts | 2 +- src/modules/generalExtensions/assets/mapSearches.ts | 2 +- src/modules/hotkeys/assets/commands/mission.ts | 8 ++++---- src/modules/messageTemplates/assets/conversations/main.ts | 2 +- src/utils.ts | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/modules/extendedBuilding/assets/enhanceVehicleList.ts b/src/modules/extendedBuilding/assets/enhanceVehicleList.ts index 368f1419b4..71c0b3b5ea 100644 --- a/src/modules/extendedBuilding/assets/enhanceVehicleList.ts +++ b/src/modules/extendedBuilding/assets/enhanceVehicleList.ts @@ -34,7 +34,7 @@ export default async ( const internalVehicleTypes = LSSM.$stores.translations.vehicles; - const tableHead = document.getElementById('vehicle_table thead tr'); + const tableHead = document.querySelector('#vehicle_table thead tr'); if (!tableHead) return; diff --git a/src/modules/extendedCallList/assets/collapsableMissions/missionlist.ts b/src/modules/extendedCallList/assets/collapsableMissions/missionlist.ts index 433f5d8871..2c0ff2146c 100644 --- a/src/modules/extendedCallList/assets/collapsableMissions/missionlist.ts +++ b/src/modules/extendedCallList/assets/collapsableMissions/missionlist.ts @@ -163,7 +163,7 @@ export default ( if (allMissionsCollapsed) allBtn.click(); - const sortBtn = document.getElementById(`${sortBtnId}`); + const sortBtn = document.getElementById(sortBtnId); if (sortBtn) { sortBtn.parentElement?.before(allBtn); } else { diff --git a/src/modules/extendedCallList/assets/sort/callList.ts b/src/modules/extendedCallList/assets/sort/callList.ts index d53ab9a88f..2829db5e90 100644 --- a/src/modules/extendedCallList/assets/sort/callList.ts +++ b/src/modules/extendedCallList/assets/sort/callList.ts @@ -120,7 +120,7 @@ export default async ( ); const panelBodyId = 'missions-panel-body'; - const panelBody = document.getElementById(`${panelBodyId}`); + const panelBody = document.getElementById(panelBodyId); if (!panelBody) return; diff --git a/src/modules/generalExtensions/assets/clickableLinks.ts b/src/modules/generalExtensions/assets/clickableLinks.ts index a5c9d09788..bd7a68fad5 100644 --- a/src/modules/generalExtensions/assets/clickableLinks.ts +++ b/src/modules/generalExtensions/assets/clickableLinks.ts @@ -54,14 +54,14 @@ export default async (LSSM: Vue, showImg: boolean): Promise => { if (text) e.message += text; const link = links.shift(); if (link) { - e.message += `${ showImg - ? `${link}` + ? `${link}` : link }`; } @@ -81,14 +81,14 @@ export default async (LSSM: Vue, showImg: boolean): Promise => { if (text) newMessage += he.escape(text); const link = links.shift(); if (link) { - newMessage += `${ showImg - ? `${link}` + ? `${link}` : link }`; } diff --git a/src/modules/generalExtensions/assets/inputMaxLen.ts b/src/modules/generalExtensions/assets/inputMaxLen.ts index ab594509dd..3c167e5f3b 100644 --- a/src/modules/generalExtensions/assets/inputMaxLen.ts +++ b/src/modules/generalExtensions/assets/inputMaxLen.ts @@ -140,7 +140,7 @@ export default (LSSM: Vue): void => { `${target.id}_${entry[0]}`, true ); - let counter = document.getElementById(`${counterId}`); + let counter = document.getElementById(counterId); if (!counter) { counter = document.createElement('small'); counter.id = counterId; diff --git a/src/modules/generalExtensions/assets/mapSearches.ts b/src/modules/generalExtensions/assets/mapSearches.ts index b56b3909a2..343d2d92b6 100644 --- a/src/modules/generalExtensions/assets/mapSearches.ts +++ b/src/modules/generalExtensions/assets/mapSearches.ts @@ -8,7 +8,7 @@ export default ( LSSM: Vue ): void => { const addToMap = (map = window.map, id = 'map') => { - if (!(map && document.getElementById(`${id}`))) return; + if (!(map && document.getElementById(id))) return; let form = document.createElement('form'); form.id = LSSM.$stores.root.nodeAttribute( diff --git a/src/modules/hotkeys/assets/commands/mission.ts b/src/modules/hotkeys/assets/commands/mission.ts index 0e8394be7d..07d116f103 100644 --- a/src/modules/hotkeys/assets/commands/mission.ts +++ b/src/modules/hotkeys/assets/commands/mission.ts @@ -58,7 +58,7 @@ export default < if ( ( document.getElementById( - `${this.toggleId}` + this.toggleId ) as HTMLInputElement )?.checked ) { @@ -75,7 +75,7 @@ export default < if ( ( document.getElementById( - `${this.toggleId}` + this.toggleId ) as HTMLInputElement )?.checked ) { @@ -92,7 +92,7 @@ export default < if ( ( document.getElementById( - `${this.toggleId}` + this.toggleId ) as HTMLInputElement )?.checked ) { @@ -109,7 +109,7 @@ export default < if ( ( document.getElementById( - `${this.toggleId}` + this.toggleId ) as HTMLInputElement )?.checked ) { diff --git a/src/modules/messageTemplates/assets/conversations/main.ts b/src/modules/messageTemplates/assets/conversations/main.ts index 28c8ab03d5..3ea90516e9 100644 --- a/src/modules/messageTemplates/assets/conversations/main.ts +++ b/src/modules/messageTemplates/assets/conversations/main.ts @@ -13,7 +13,7 @@ export default (messages: ConversationMessageTemplate[], $m: $m) => { const insert = document.createElement('button'); insert.classList.add('btn', 'btn-default', 'dropdown-toggle'); insert.setAttribute('data-toggle', 'dropdown'); - insert.innerHTML = `${$m('name')} `; + insert.innerHTML = `${$m('name')} `; const optionList = document.createElement('ul'); optionList.classList.add('dropdown-menu'); fillDropdown( diff --git a/src/utils.ts b/src/utils.ts index fdb6f4dacd..adfc26ac21 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -114,7 +114,7 @@ export default (Vue: VueConstructor): void => { const $utils = (window[PREFIX] as Vue).$utils; if (initialCall && $utils.activeCountdowns.includes(id)) return; - const element = document.getElementById(`${id}`); + const element = document.getElementById(id); const activeIndex = $utils.activeCountdowns.indexOf(id); if (!element || countdown <= 0) { if (activeIndex >= 0)