| Conditions | 5 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import * as core from '../utils/aniwatchCore'; |
||
| 15 | function observeScreenshotTooltip(tooltip) { |
||
| 16 | let observer = new MutationObserver(mutations => { |
||
|
|
|||
| 17 | mutations.forEach(mutation => { |
||
| 18 | // Switched to invisible |
||
| 19 | if (!mutation.oldValue.includes('display: none') && mutation.target.style.display == 'none') { |
||
| 20 | let player = findPlayer(); |
||
| 21 | if(typeof player !== 'undefined'){ |
||
| 22 | resumePlayer(player); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | }); |
||
| 26 | }); |
||
| 27 | |||
| 28 | observer.observe(tooltip, { |
||
| 29 | attributes: true, |
||
| 30 | attributeOldValue: true, |
||
| 31 | attributeFilter: ['style'], |
||
| 32 | }); |
||
| 33 | } |
||
| 34 | |||
| 48 | } |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.