* Removes the CSS style element and resets grid attributes.
()
| 533 | * Removes the CSS style element and resets grid attributes. |
| 534 | */ |
| 535 | removeCSS() { |
| 536 | const style = document.getElementById('dynamic-grid-style') |
| 537 | if (style) { |
| 538 | style.remove() |
| 539 | logger('Removed CSS style element', 'debug') |
| 540 | } |
| 541 | const grid = document.querySelector('ytd-rich-grid-renderer') |
| 542 | if (grid) { |
| 543 | grid.removeAttribute('elements-per-row') |
| 544 | grid.style.removeProperty('--ytd-rich-grid-items-per-row') |
| 545 | grid.style.removeProperty('--ytd-rich-grid-posts-per-row') |
| 546 | logger('Reset grid attributes', 'debug') |
| 547 | } |
| 548 | }, |
| 549 | |
| 550 | /** |
| 551 | * Attempts to update the grid with retries. |