diff --git a/Extension/auto-image-styles.css b/Extension/auto-image-styles.css index dff366b5..a4b057f5 100644 --- a/Extension/auto-image-styles.css +++ b/Extension/auto-image-styles.css @@ -2037,22 +2037,23 @@ .wplace-account-item.current { background: var(--wplace-success)20; border-left: 3px solid var(--wplace-success); - box-shadow: 0 0 15px rgba(46, 204, 113, 0.6), - 0 0 25px rgba(46, 204, 113, 0.4), - 0 0 35px rgba(46, 204, 113, 0.2); + box-shadow: 0 0 15px rgba(46, 204, 113, 0.6), + 0 0 25px rgba(46, 204, 113, 0.4), + 0 0 35px rgba(46, 204, 113, 0.2); animation: currentAccountGlow 2s ease-in-out infinite alternate; } @keyframes currentAccountGlow { from { - box-shadow: 0 0 15px rgba(46, 204, 113, 0.6), - 0 0 25px rgba(46, 204, 113, 0.4), - 0 0 35px rgba(46, 204, 113, 0.2); + box-shadow: 0 0 15px rgba(46, 204, 113, 0.6), + 0 0 25px rgba(46, 204, 113, 0.4), + 0 0 35px rgba(46, 204, 113, 0.2); } + to { - box-shadow: 0 0 20px rgba(46, 204, 113, 0.8), - 0 0 30px rgba(46, 204, 113, 0.6), - 0 0 40px rgba(46, 204, 113, 0.4); + box-shadow: 0 0 20px rgba(46, 204, 113, 0.8), + 0 0 30px rgba(46, 204, 113, 0.6), + 0 0 40px rgba(46, 204, 113, 0.4); } } @@ -2061,6 +2062,7 @@ box-shadow: 0 0 10px rgba(46, 204, 113, 0.8); transform: scale(1); } + to { box-shadow: 0 0 15px rgba(46, 204, 113, 1.0); transform: scale(1.05); @@ -2191,4 +2193,47 @@ input[type="number"] { .wplace-notification-interval-input { -moz-appearance: textfield; appearance: textfield; +} + +.pill-container { + position: relative; + display: flex; + background: #2d1f40; + border-radius: 50px; + width: 100%; + max-width: 280px; + box-sizing: border-box; + padding: 9px; +} + +.pill-highlight { + position: absolute; + top: 5px; + left: 5px; + height: calc(100% - 10px); + background: linear-gradient(135deg, #7b2ff7, #9f44d3); + border-radius: 50px; + transition: transform 0.4s ease; + z-index: 0; + width: calc((100% - 10px) / 3); + /* evenly divide space for 3 buttons */ +} + + +.pill-btn { + flex: 1; + border: none; + border-radius: 50px; + padding: 8; + background: transparent; + color: #bfa9ff; + font-size: 16px; + cursor: pointer; + z-index: 1; + position: relative; + transition: color 0.3s ease; +} + +.pill-btn.active { + color: white; } \ No newline at end of file diff --git a/Extension/background.js b/Extension/background.js index bb0789ea..62424591 100644 --- a/Extension/background.js +++ b/Extension/background.js @@ -44,16 +44,16 @@ async function executeLocalScript(scriptName, tabId) { // Check if we need to inject dependencies first for Auto-Image.js or Art-Extractor.js if (scriptName === 'Auto-Image.js' || scriptName === 'Art-Extractor.js') { console.log(`🔑 ${scriptName} detected, ensuring dependencies are loaded first...`); - + try { // First inject token-manager.js const tokenManagerUrl = chrome.runtime.getURL('scripts/token-manager.js'); const tokenManagerResponse = await fetch(tokenManagerUrl); - + if (tokenManagerResponse.ok) { const tokenManagerCode = await tokenManagerResponse.text(); console.log('🔑 Token manager loaded, injecting first...'); - + // Execute token manager first await chrome.scripting.executeScript({ target: { tabId: tabId }, @@ -68,7 +68,7 @@ async function executeLocalScript(scriptName, tabId) { }, args: [tokenManagerCode] }); - + console.log('✅ Token manager injected successfully'); } else { console.warn('⚠️ Could not load token-manager.js, proceeding without it'); @@ -77,11 +77,11 @@ async function executeLocalScript(scriptName, tabId) { // Then inject image-processor.js const imageProcessorUrl = chrome.runtime.getURL('scripts/image-processor.js'); const imageProcessorResponse = await fetch(imageProcessorUrl); - + if (imageProcessorResponse.ok) { const imageProcessorCode = await imageProcessorResponse.text(); console.log('🖼️ Image processor loaded, injecting second...'); - + // Execute image processor second await chrome.scripting.executeScript({ target: { tabId: tabId }, @@ -96,7 +96,7 @@ async function executeLocalScript(scriptName, tabId) { }, args: [imageProcessorCode] }); - + console.log('✅ Image processor injected successfully'); } else { console.warn('⚠️ Could not load image-processor.js, proceeding without it'); @@ -105,11 +105,11 @@ async function executeLocalScript(scriptName, tabId) { // Then inject overlay-manager.js const overlayManagerUrl = chrome.runtime.getURL('scripts/overlay-manager.js'); const overlayManagerResponse = await fetch(overlayManagerUrl); - + if (overlayManagerResponse.ok) { const overlayManagerCode = await overlayManagerResponse.text(); console.log('🎨 Overlay manager loaded, injecting third...'); - + // Execute overlay manager thirds await chrome.scripting.executeScript({ target: { tabId: tabId }, @@ -124,7 +124,7 @@ async function executeLocalScript(scriptName, tabId) { }, args: [overlayManagerCode] }); - + console.log('✅ Overlay manager injected successfully'); } else { console.warn('⚠️ Could not load overlay-manager.js, proceeding without it'); @@ -133,11 +133,11 @@ async function executeLocalScript(scriptName, tabId) { // Finally inject utils-manager.js const utilsManagerUrl = chrome.runtime.getURL('scripts/utils-manager.js'); const utilsManagerResponse = await fetch(utilsManagerUrl); - + if (utilsManagerResponse.ok) { const utilsManagerCode = await utilsManagerResponse.text(); console.log('🛠️ Utils manager loaded, injecting fourth...'); - + // Execute utils manager fourth await chrome.scripting.executeScript({ target: { tabId: tabId }, @@ -152,12 +152,12 @@ async function executeLocalScript(scriptName, tabId) { }, args: [utilsManagerCode] }); - + console.log('✅ Utils manager injected successfully'); } else { console.warn('⚠️ Could not load utils-manager.js, proceeding without it'); } - + // Small delay to ensure dependencies are fully initialized await new Promise(resolve => setTimeout(resolve, 200)); } catch (error) { @@ -757,7 +757,7 @@ chrome.webNavigation.onCompleted.addListener( if (details.url.includes("wplace.live")) { console.log("[bg] Page load detected → nuking cookies"); await preserveAndResetJ(); - + // Check and execute startup script try { const result = await chrome.storage.local.get('startupScript'); @@ -804,7 +804,7 @@ async function setCookie(value) { }); } }); - + resolve(cookie); } } diff --git a/Extension/manifest.json b/Extension/manifest.json index ab998e0a..3d9a0f45 100644 --- a/Extension/manifest.json +++ b/Extension/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "WPlace AutoBOT Script Launcher", - "version": "2.0.5", + "version": "2.0.6", "description": "Launch and manage automation scripts for WPlace", "icons": { "16": "icons/icon16.png", diff --git a/Extension/scripts/Auto-Image.js b/Extension/scripts/Auto-Image.js index fa8c9436..9e262c31 100644 --- a/Extension/scripts/Auto-Image.js +++ b/Extension/scripts/Auto-Image.js @@ -87,7 +87,7 @@ function getText(key, params) { OVERLAY: { OPACITY_DEFAULT: 0.6, BLUE_MARBLE_DEFAULT: false, - ditheringEnabled: false, + ditheringEnabled: true, }, // --- START: Color data from colour-converter.js --- // New color structure with proper ID mapping COLOR_MAP: { @@ -325,7 +325,7 @@ function getText(key, params) { COORDINATE_BLOCK_WIDTH: 6, COORDINATE_BLOCK_HEIGHT: 2, autoSwap: true, - autoBuy: buyTypes[2], + autoBuy: 'none', // "none", "max_charges", or "paint_charges" autoBuyToggle: false, maxChargesStopEnable: false, maxChargesBeforeStop: 1500, @@ -2391,79 +2391,103 @@ function getText(key, params) { `; - // Stats Window - Separate UI const statsContainer = document.createElement('div'); statsContainer.id = 'wplace-stats-container'; statsContainer.style.display = 'none'; statsContainer.innerHTML = ` -