Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 54 additions & 9 deletions Extension/auto-image-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
Expand Down Expand Up @@ -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;
}
32 changes: 16 additions & 16 deletions Extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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');
Expand All @@ -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 },
Expand All @@ -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');
Expand All @@ -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 },
Expand All @@ -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');
Expand All @@ -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 },
Expand All @@ -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) {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -804,7 +804,7 @@ async function setCookie(value) {
});
}
});

resolve(cookie);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Extension/manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading