Skip to content

Commit

Permalink
🐛️[all] revert wrong refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Cr4zyc4k3 committed Aug 27, 2024
1 parent cf1c16e commit 8908306
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/modules/extendedBuilding/assets/enhanceVehicleList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/extendedCallList/assets/sort/callList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/modules/generalExtensions/assets/clickableLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ export default async (LSSM: Vue, showImg: boolean): Promise<void> => {
if (text) e.message += text;
const link = links.shift();
if (link) {
e.message += `<a href='${link}' ${
e.message += `<a href="${link}" ${
new URL(link, window.location.origin).origin ===
window.location.origin
? 'class="lightbox-open"'
: 'target="_blank"'
}>${
showImg
? `<img src='${link}' alt='${link}' style='max-width: 10%;'/>`
? `<img src="${link}" alt="${link}" style="max-width: 10%;"/>`
: link
}</a>`;
}
Expand All @@ -81,14 +81,14 @@ export default async (LSSM: Vue, showImg: boolean): Promise<void> => {
if (text) newMessage += he.escape(text);
const link = links.shift();
if (link) {
newMessage += `<a href='${link}' ${
newMessage += `<a href="${link}" ${
new URL(link, window.location.origin).origin ===
window.location.origin
? 'class="lightbox-open"'
: 'target="_blank"'
}>${
showImg
? `<img src='${link}' alt='${link}' style='max-width: 10%;'/>`
? `<img src="${link}" alt="${link}" style="max-width: 10%;"/>`
: link
}</a>`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/generalExtensions/assets/inputMaxLen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/generalExtensions/assets/mapSearches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/modules/hotkeys/assets/commands/mission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default <
if (
(
document.getElementById(
`${this.toggleId}`
this.toggleId
) as HTMLInputElement
)?.checked
) {
Expand All @@ -75,7 +75,7 @@ export default <
if (
(
document.getElementById(
`${this.toggleId}`
this.toggleId
) as HTMLInputElement
)?.checked
) {
Expand All @@ -92,7 +92,7 @@ export default <
if (
(
document.getElementById(
`${this.toggleId}`
this.toggleId
) as HTMLInputElement
)?.checked
) {
Expand All @@ -109,7 +109,7 @@ export default <
if (
(
document.getElementById(
`${this.toggleId}`
this.toggleId
) as HTMLInputElement
)?.checked
) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/messageTemplates/assets/conversations/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')}&nbsp;<span class='caret'></span>`;
insert.innerHTML = `${$m('name')}&nbsp;<span class="caret"></span>`;
const optionList = document.createElement('ul');
optionList.classList.add('dropdown-menu');
fillDropdown(
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8908306

Please sign in to comment.