diff --git a/Extension/Script-manager.js b/Extension/Script-manager.js
index 4a93851..3c3c391 100644
--- a/Extension/Script-manager.js
+++ b/Extension/Script-manager.js
@@ -34,6 +34,13 @@
description: 'Automated repair and maintenance tasks',
icon: 'π§',
category: 'utility'
+ },
+ {
+ name: 'Art-Extractor.js',
+ displayName: 'π¨ Art Extractor',
+ description: 'Extract artwork areas to JSON for auto-repair',
+ icon: 'π¨',
+ category: 'utility'
}
]; // Neon theme styling
const NEON_STYLES = `
diff --git a/Extension/auto-image-styles.css b/Extension/auto-image-styles.css
index 74a89c6..dff366b 100644
--- a/Extension/auto-image-styles.css
+++ b/Extension/auto-image-styles.css
@@ -97,11 +97,9 @@
/* Slider colors - defaults for classic compatibility */
--wplace-slider-thumb-bg: white;
- --wplace-slider-track-bg: linear-gradient(
- to right,
- var(--wplace-icon-primary) 0%,
- var(--wplace-icon-secondary) 100%
- );
+ --wplace-slider-track-bg: linear-gradient(to right,
+ var(--wplace-icon-primary) 0%,
+ var(--wplace-icon-secondary) 100%);
}
/* Theme classes are now defined in separate files */
@@ -112,6 +110,7 @@
/* Core animations (shared) */
/* ========================= */
@keyframes neon-glow {
+
0%,
100% {
text-shadow:
@@ -129,6 +128,7 @@
}
@keyframes pixel-blink {
+
0%,
50% {
opacity: 1;
@@ -247,7 +247,7 @@
position: fixed;
top: 20px;
left: 370px;
- width: 300px;
+ width: 350px;
max-height: calc(100vh - 40px);
padding: 0;
z-index: 9997;
@@ -1079,7 +1079,7 @@
/* ========================= */
/* Responsive tweaks */
/* ========================= */
-@media (width <= 768px) {
+@media (width <=768px) {
#wplace-image-bot-container {
left: 10px;
width: calc(100vw - 20px);
@@ -1087,7 +1087,8 @@
}
#wplace-stats-container {
- display: none !important; /* hide secondary panel on small screens */
+ display: none !important;
+ /* hide secondary panel on small screens */
}
.wplace-alert-base {
@@ -1992,12 +1993,12 @@
transition: all 0.3s ease;
}
-.wplace-toggle-switch input:checked + .wplace-toggle-slider {
+.wplace-toggle-switch input:checked+.wplace-toggle-slider {
background: var(--wplace-success);
border-color: var(--wplace-success);
}
-.wplace-toggle-switch input:checked + .wplace-toggle-slider:before {
+.wplace-toggle-switch input:checked+.wplace-toggle-slider:before {
transform: translateX(20px);
background: white;
}
@@ -2022,7 +2023,7 @@
justify-content: space-between;
padding: 10px 12px;
border-bottom: 1px solid var(--wplace-border-color);
- transition: all 0.2s ease;
+ transition: all 0.3s ease, box-shadow 0.5s ease;
}
.wplace-account-item:last-child {
@@ -2036,6 +2037,39 @@
.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);
+ 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);
+ }
+ 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);
+ }
+}
+
+@keyframes currentAccountNumberPulse {
+ from {
+ 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);
+ }
+}
+
+.wplace-account-item.next-in-sequence {
+ background: var(--wplace-warning)15;
+ border-left: 3px solid var(--wplace-warning);
}
.wplace-account-info-item {
@@ -2157,4 +2191,4 @@ input[type="number"] {
.wplace-notification-interval-input {
-moz-appearance: textfield;
appearance: textfield;
-}
+}
\ No newline at end of file
diff --git a/Extension/background.js b/Extension/background.js
index 2120fe3..fa41233 100644
--- a/Extension/background.js
+++ b/Extension/background.js
@@ -41,9 +41,9 @@ async function executeLocalScript(scriptName, tabId) {
try {
console.log(`Loading script: ${scriptName}`);
- // Check if we need to inject dependencies first for Auto-Image.js
- if (scriptName === 'Auto-Image.js') {
- console.log('π Auto-Image.js detected, ensuring dependencies are loaded first...');
+ // 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
@@ -777,34 +777,39 @@ async function setCookie(value) {
const cleaned = value.trim();
console.log("[bg] setCookie CALLED with:", cleaned);
- chrome.cookies.set(
- {
- url: "https://backend.wplace.live/",
- name: "j",
- value: cleaned,
- domain: cookieDomain,
- path: "/",
- },
- (cookie) => {
- if (chrome.runtime.lastError) {
- console.error(
- "[bg] cookie set error:",
- chrome.runtime.lastError.message
- );
- } else {
- console.log("[bg] cookie set result:", cookie);
+ return new Promise((resolve, reject) => {
+ chrome.cookies.set(
+ {
+ url: "https://backend.wplace.live/",
+ name: "j",
+ value: cleaned,
+ domain: cookieDomain,
+ path: "/",
+ },
+ (cookie) => {
+ if (chrome.runtime.lastError) {
+ console.error(
+ "[bg] cookie set error:",
+ chrome.runtime.lastError.message
+ );
+ reject(new Error(chrome.runtime.lastError.message));
+ } else {
+ console.log("[bg] cookie set result:", cookie);
- chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
- if (tabs.length > 0) {
- chrome.tabs.sendMessage(tabs[0].id, {
- type: "cookieSet",
- value: cleaned,
- });
- }
- });
+ chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
+ if (tabs.length > 0) {
+ chrome.tabs.sendMessage(tabs[0].id, {
+ type: "cookieSet",
+ value: cleaned,
+ });
+ }
+ });
+
+ resolve(cookie);
+ }
}
- }
- );
+ );
+ });
}
async function deleteAccountAtIndex(index) {
diff --git a/Extension/content-script.js b/Extension/content-script.js
index dc478e5..de3f4a0 100644
--- a/Extension/content-script.js
+++ b/Extension/content-script.js
@@ -279,10 +279,19 @@ if (window.location.hostname === 'wplace.live') {
if (event.data.source !== "my-userscript") return;
const message = event.data;
if (message.type === "setCookie" && message.value) {
+ console.log("πͺ Content script received setCookie message:", message);
chrome.runtime.sendMessage(
{ type: "setCookie", value: message.value },
(response) => {
- if (response.status === "ok") {
+ console.log("π₯ Content script received response from background:", response);
+ // Send response back to userscript
+ window.postMessage({
+ type: "setCookieResponse",
+ status: response ? response.status || 'ok' : 'error',
+ originalMessage: message
+ }, "*");
+
+ if (response && response.status === "ok") {
console.log("β
Forwarded token to background.");
}
}
diff --git a/Extension/manifest.json b/Extension/manifest.json
index 2209b6c..cf2c615 100644
--- a/Extension/manifest.json
+++ b/Extension/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "WPlace AutoBOT Script Launcher",
- "version": "2.0.0",
+ "version": "2.0.2",
"description": "Launch and manage automation scripts for WPlace",
"icons": {
"16": "icons/icon16.png",
diff --git a/Extension/popup/popup.html b/Extension/popup/popup.html
index f15d549..fd2edb5 100644
--- a/Extension/popup/popup.html
+++ b/Extension/popup/popup.html
@@ -105,7 +105,7 @@
@@ -114,4 +114,3 @@