diff --git a/Auto-Image.js b/Auto-Image.js index c6798da..a5b3914 100644 --- a/Auto-Image.js +++ b/Auto-Image.js @@ -3125,6 +3125,19 @@ function applyTheme() { updateActiveColorPalette(); } + function unselectAllPaidColors() { + const swatches = document.querySelectorAll('.wplace-color-swatch'); + if (swatches) { + swatches.forEach(swatch => { + const colorId = parseInt(swatch.getAttribute('data-color-id'), 10); + if (!isNaN(colorId) && colorId>= 32) { + swatch.classList.toggle('active', false); + } + }); + } + updateActiveColorPalette(); + } + function initializeColorPalette(container) { const colorsContainer = container.querySelector('#colors-container'); const showAllToggle = container.querySelector('#showAllColorsToggle'); @@ -3215,6 +3228,7 @@ function applyTheme() { container.querySelector('#selectAllBtn')?.addEventListener('click', () => toggleAllColors(true, showAllToggle?.checked)); container.querySelector('#unselectAllBtn')?.addEventListener('click', () => toggleAllColors(false, showAllToggle?.checked)); + container.querySelector('#unselectPaidBtn')?.addEventListener('click', () => unselectAllPaidColors()); } async function handleCaptcha() { const startTime = performance.now(); @@ -3965,6 +3979,7 @@ function applyTheme() {