|
| 1 | +/* eslint-disable unicorn/prefer-query-selector */ |
1 | 2 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment |
2 | 3 | // @ts-nocheck |
3 | 4 | import {api} from './api'; |
@@ -204,7 +205,7 @@ const popups = () => { |
204 | 205 | if (lTitle.toString(true) !== aTitle.toString(true)) { |
205 | 206 | return false; |
206 | 207 | } |
207 | | - let el = document.querySelector(`#${anch}`); |
| 208 | + let el = document.getElementById(`${anch}`); |
208 | 209 | while (el && typeof el.nodeName === 'string') { |
209 | 210 | const nt = el.nodeName.toLowerCase(); |
210 | 211 | if (nt === 'li') { |
@@ -1574,10 +1575,10 @@ const popups = () => { |
1574 | 1575 | }; |
1575 | 1576 | Insta.dump = function (from, to) { |
1576 | 1577 | if (typeof from === 'string') { |
1577 | | - from = document.querySelector(`#${from}`); |
| 1578 | + from = document.getElementById(`${from}`); |
1578 | 1579 | } |
1579 | 1580 | if (typeof to === 'string') { |
1580 | | - to = document.querySelector(`#${to}`); |
| 1581 | + to = document.getElementById(`${to}`); |
1581 | 1582 | } |
1582 | 1583 | to.innerHTML = this.convert(from.value); |
1583 | 1584 | }; |
@@ -3253,7 +3254,7 @@ const popups = () => { |
3253 | 3254 | // console.error('[Popups] popupId is not defined in setPopupHTML, html='+str.substring(0,100)); |
3254 | 3255 | popupId = pg.idNumber; |
3255 | 3256 | } |
3256 | | - const popupElement = document.querySelector(`#${elementId}${popupId}`); |
| 3257 | + const popupElement = document.getElementById(`${elementId}${popupId}`); |
3257 | 3258 | if (popupElement) { |
3258 | 3259 | if (!append) { |
3259 | 3260 | popupElement.innerHTML = ''; |
@@ -3427,7 +3428,7 @@ const popups = () => { |
3427 | 3428 | const popTipsSoonFn = (id, when, popData) => { |
3428 | 3429 | when ||= 250; |
3429 | 3430 | const popTips = () => { |
3430 | | - setupTooltips(document.querySelector(`#${id}`), false, true, popData); |
| 3431 | + setupTooltips(document.getElementById(`${id}`), false, true, popData); |
3431 | 3432 | }; |
3432 | 3433 | return () => { |
3433 | 3434 | setTimeout(popTips, when, popData); |
@@ -5537,7 +5538,7 @@ const popups = () => { |
5537 | 5538 | } |
5538 | 5539 | let dragHandle; |
5539 | 5540 | if (handleName) { |
5540 | | - dragHandle = document.querySelector(`#${handleName}`); |
| 5541 | + dragHandle = document.getElementById(`${handleName}`); |
5541 | 5542 | } |
5542 | 5543 | dragHandle ||= this.mainDiv; |
5543 | 5544 | const self = this; |
|
0 commit comments