| 797 | 797 | return JSON.stringify([]); |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | +function addGalleryWandButton() { |
| 801 | + const showGalleryContainer = document.getElementById('gallery_wand_container') || document.getElementById('extensionsMenu'); |
| 802 | + if (!(showGalleryContainer instanceof HTMLElement)) { |
| 803 | + return; |
| 804 | + } |
| 805 | + const showGalleryButton = document.createElement('div'); |
| 806 | + showGalleryButton.id = 'show_gallery_wand_button'; |
| 807 | + showGalleryButton.classList.add('list-group-item', 'flex-container', 'flexGap5'); |
| 808 | + const showGalleryIcon = document.createElement('div'); |
| 809 | + showGalleryIcon.classList.add('fa-solid', 'fa-sd-card', 'extensionsMenuExtensionButton'); |
| 810 | + const showGalleryText = document.createElement('span'); |
| 811 | + showGalleryText.textContent = translate('Show Gallery'); |
| 812 | + showGalleryButton.appendChild(showGalleryIcon); |
| 813 | + showGalleryButton.appendChild(showGalleryText); |
| 814 | + showGalleryButton.addEventListener('click', () => { |
| 815 | + showCharGallery(); |
| 816 | + }); |
| 817 | + showGalleryContainer.appendChild(showGalleryButton); |
| 818 | +} |
| 819 | + |
| 800 | 820 | // On extension load, ensure the settings are initialized |
| 801 | 821 | (function () { |
| 802 | 822 | initSettings(); |