* Attempts to update the grid with retries. * @param {number} [attempts=CONFIG.RETRY_ATTEMPTS] - Retry attempts
(attempts = CONFIG.RETRY_ATTEMPTS)
| 552 | * @param {number} [attempts=CONFIG.RETRY_ATTEMPTS] - Retry attempts |
| 553 | */ |
| 554 | tryUpdate(attempts = CONFIG.RETRY_ATTEMPTS) { |
| 555 | if (isPlaylistPage()) { |
| 556 | logger('Skipping grid update on playlist page') |
| 557 | this.removeCSS() |
| 558 | return |
| 559 | } |
| 560 | this.updateGrid() |
| 561 | if ( |
| 562 | attempts > 0 && |
| 563 | !document.querySelector('ytd-rich-grid-renderer:not([hidden])') |
| 564 | ) { |
| 565 | logger(`Retrying grid update (${attempts} attempts left)`, 'debug') |
| 566 | setTimeout(() => this.tryUpdate(attempts - 1), CONFIG.RETRY_INTERVAL) |
| 567 | } |
| 568 | }, |
| 569 | |
| 570 | /** |
| 571 | * Polls the grid for changes until stable. |
nothing calls this directly
no test coverage detected