From b1fba53fda39f4c303e9be6738d29bdf2c3b8b1e Mon Sep 17 00:00:00 2001 From: cwurn <146986708+cw-urn@users.noreply.github.com> Date: Fri, 29 Aug 2025 02:49:10 +0300 Subject: [PATCH] Update Auto-Image.js --- Auto-Image.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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() {