Fixed CSS bug on GreasyFork flavor
Some checks are pending
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run

This commit is contained in:
SwingTheVine 2026-02-14 02:16:35 -05:00
parent d44ab66b6c
commit 1e9801c3ce
10 changed files with 253 additions and 14 deletions

View file

@ -103,6 +103,7 @@ jobs:
dist_size=$(find dist -type f \
! -name "BlueMarble-Standalone.user.js" \
! -name "BlueMarble-For-GreasyFork.user.js" \
! -name "BlueMarble-For-GreasyFork.user.css" \
-exec cat {} + | wc -c)
src_size=$(find src dist/assets -type f -exec cat {} + | wc -c)

View file

@ -143,8 +143,8 @@ fs.writeFileSync(
console.log(`${consoleStyle.BLUE}Building 2 of 3...${consoleStyle.RESET}`);
const standaloneName = 'BlueMarble-Standalone.user.js'; // Standalone flavor name of flie
const standaloneBMUpdateURL = `https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/${standaloneName}`;
const standaloneName = 'BlueMarble-Standalone'; // Standalone flavor name of flie
const standaloneBMUpdateURL = `https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/${standaloneName}.user.js`;
// Fetches the completed, main Blue Marble userscript files
const mainBMjs = fs.readFileSync('dist/BlueMarble.user.js', 'utf8');
@ -180,12 +180,12 @@ standaloneBMjs = standaloneBMjs.replace(/\/\/\s+\@updateURL\s+https.*\r?\n?/g, `
standaloneBMjs = standaloneBMjs.replace(/\/\/\s+\@downloadURL\s+https.*\r?\n?/g, `// @downloadURL ${standaloneBMUpdateURL}\n`);
// Generates the Blue Marble JS file that contains all external resources
fs.writeFileSync(`dist/${standaloneName}`, standaloneBMjs, 'utf-8');
fs.writeFileSync(`dist/${standaloneName}.user.js`, standaloneBMjs, 'utf-8');
console.log(`${consoleStyle.BLUE}Building 3 of 3...${consoleStyle.RESET}`);
const greasyForkName = 'BlueMarble-For-GreasyFork.user.js'; // GreasyFork flavor name of file
const greasyForkUpdateURL = `https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/${greasyForkName}`;
const greasyForkName = 'BlueMarble-For-GreasyFork'; // GreasyFork flavor name of file
const greasyForkUpdateURL = `https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/${greasyForkName}.user.js`;
let greasyForkBMjs = metaContent + resultEsbuildJS.text; // Gets the unobfuscated code and adds the metadata banner
@ -193,6 +193,14 @@ let greasyForkBMjs = metaContent + resultEsbuildJS.text; // Gets the unobfuscate
greasyForkBMjs = greasyForkBMjs.replace(/\/\/\s+\@updateURL\s+https.*\r?\n?/g, `// @updateURL ${greasyForkUpdateURL}\n`);
greasyForkBMjs = greasyForkBMjs.replace(/\/\/\s+\@downloadURL\s+https.*\r?\n?/g, `// @downloadURL ${greasyForkUpdateURL}\n`);
fs.writeFileSync(`dist/${greasyForkName}`, greasyForkBMjs, 'utf-8');
// Compiles the CSS files
esbuild.build({
entryPoints: cssFiles,
bundle: true,
outfile: `dist/${greasyForkName}.user.css`,
minify: false
});
fs.writeFileSync(`dist/${greasyForkName}.user.js`, greasyForkBMjs, 'utf-8');
console.log(`${consoleStyle.GREEN + consoleStyle.BOLD + consoleStyle.UNDERLINE}Building complete!${consoleStyle.RESET}`);

230
dist/BlueMarble-For-GreasyFork.user.css vendored Normal file
View file

@ -0,0 +1,230 @@
/* src/overlay.css */
#bm-overlay,
#bm-overlay-telemetry {
position: fixed;
background-color: rgba(21, 48, 99, 0.9);
color: white;
padding: 10px;
border-radius: 8px;
z-index: 9000;
transition: all 0.3s ease, transform 0s;
max-width: 300px;
width: auto;
will-change: transform;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
}
#bm-contain-userinfo,
#bm-overlay hr,
#bm-overlay-telemetry hr,
#bm-contain-automation,
#bm-contain-buttons-action {
transition: opacity 0.2s ease, height 0.2s ease;
}
div#bm-overlay,
div#bm-overlay-telemetry {
font-family:
"Roboto Mono",
"Courier New",
"Monaco",
"DejaVu Sans Mono",
monospace,
"Arial";
letter-spacing: 0.05em;
}
#bm-bar-drag,
#bm-bar-drag-telemetry {
margin-bottom: 0.5em;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="5" height="5"><circle cx="3" cy="3" r="1.5" fill="CornflowerBlue" /></svg>') repeat;
cursor: grab;
width: 100%;
height: 1em;
}
#bm-bar-drag.dragging,
#bm-bar-drag-telemetry.dragging {
cursor: grabbing;
}
#bm-overlay:has(#bm-bar-drag.dragging),
#bm-overlay-telemetry:has(#bm-bar-drag-telemetry.dragging) {
pointer-events: none;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
#bm-bar-drag.dragging,
#bm-bar-drag-telemetry.dragging {
pointer-events: auto;
}
#bm-contain-header,
#bm-contain-header-telemetry {
margin-bottom: 0.5em;
}
#bm-contain-header[style*="text-align: center"],
#bm-contain-header-telemetry[style*="text-align: center"] {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#bm-overlay[style*="padding: 5px"],
#bm-overlay-telemetry[style*="padding: 5px"] {
width: auto !important;
max-width: 300px;
min-width: 200px;
}
#bm-overlay img {
display: inline-block;
height: 2.5em;
margin-right: 1ch;
vertical-align: middle;
transition: opacity 0.2s ease;
}
#bm-contain-header[style*="text-align: center"] img {
margin-right: 0;
margin-left: 0;
display: block;
margin: 0 auto;
}
#bm-bar-drag,
#bm-bar-drag-telemetry {
transition: margin-bottom 0.2s ease;
}
#bm-overlay h1,
#bm-overlay-telemetry h1 {
display: inline-block;
font-size: x-large;
font-weight: bold;
vertical-align: middle;
}
#bm-contain-automation input[type=checkbox] {
vertical-align: middle;
margin-right: 0.5ch;
}
#bm-contain-automation label {
margin-right: 0.5ch;
}
.bm-help {
border: white 1px solid;
height: 1.5em;
width: 1.5em;
margin-top: 2px;
text-align: center;
line-height: 1em;
padding: 0 !important;
}
#bm-button-coords {
vertical-align: middle;
}
#bm-button-coords svg {
width: 50%;
margin: 0 auto;
fill: #111;
}
#bm-contain-userinfo {
margin-bottom: 0.5em;
}
div:has(> #bm-button-teleport) {
display: flex;
gap: 0.5ch;
}
#bm-button-favorite svg,
#bm-button-template svg {
height: 1em;
margin: 0 auto;
margin-top: 2px;
text-align: center;
line-height: 1em;
vertical-align: bottom;
}
#bm-contain-coords input[type=number] {
appearance: auto;
-moz-appearance: textfield;
width: 5.5ch;
margin-left: 1ch;
background-color: rgba(0, 0, 0, 0.2);
padding: 0 0.5ch;
font-size: small;
}
#bm-contain-coords input[type=number]::-webkit-outer-spin-button,
#bm-contain-coords input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
#bm-contain-buttons-template {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: center;
justify-content: center;
align-items: center;
gap: 1ch;
}
div:has(> #bm-input-file-template) > button {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#bm-input-file-template,
input[type=file][id*=template] {
display: none !important;
visibility: hidden !important;
position: absolute !important;
left: -9999px !important;
top: -9999px !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
z-index: -9999 !important;
pointer-events: none !important;
}
#bm-output-status {
font-size: small;
background-color: rgba(0, 0, 0, 0.2);
padding: 0 0.5ch;
height: 3.75em;
width: 100%;
}
#bm-contain-buttons-action {
display: flex;
justify-content: space-between;
}
div#bm-contain-buttons-action button#bm-help {
margin-right: 2px;
}
#bm-overlay small {
font-size: x-small;
color: lightgray;
}
#bm-contain-userinfo,
#bm-contain-automation,
#bm-contain-coords,
#bm-contain-buttons-template,
div:has(> #bm-input-file-template),
#bm-output-status {
margin-top: 0.5em;
}
#bm-overlay button,
#bm-overlay-telemetry button {
background-color: #144eb9;
border-radius: 1em;
padding: 0 0.75ch;
}
#bm-overlay button:hover,
#bm-overlay button:focus-visible,
#bm-overlay-telemetry button:hover,
#bm-overlay-telemetry button:focus-visible {
background-color: #1061e5;
}
#bm-overlay button:active,
#bm-overlay-telemetry button:active #bm-overlay button:disabled,
#bm-overlay-telemetry button:disabled {
background-color: #2e97ff;
}
#bm-overlay button:disabled,
#bm-overlay-telemetry button:disabled {
text-decoration: line-through;
}

View file

@ -2,7 +2,7 @@
// @name Blue Marble
// @name:en Blue Marble
// @namespace https://github.com/SwingTheVine/
// @version 0.88.77
// @version 0.88.79
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @description:en A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine

View file

@ -2,7 +2,7 @@
// @name Blue Marble
// @name:en Blue Marble
// @namespace https://github.com/SwingTheVine/
// @version 0.88.77
// @version 0.88.79
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @description:en A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine

View file

@ -2,7 +2,7 @@
// @name Blue Marble
// @name:en Blue Marble
// @namespace https://github.com/SwingTheVine/
// @version 0.88.77
// @version 0.88.79
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @description:en A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine

View file

@ -51,7 +51,7 @@
<a href="https://discord.gg/tpeBPy46hf" target="_blank" rel="noopener noreferrer"><img alt="Contact Me" src="https://img.shields.io/badge/Contact_Me-gray?style=flat&logo=Discord&logoColor=white&logoSize=auto&labelColor=cornflowerblue"></a>
<a href="https://bluemarble.lol/" target="_blank" rel="noopener noreferrer"><img alt="Blue Marble Website" src="https://img.shields.io/badge/Blue_Marble_Website-crqch-blue?style=flat&logo=globe&logoColor=white"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="WakaTime" src="https://img.shields.io/badge/Coding_Time-111hrs_12mins-blue?style=flat&logo=wakatime&logoColor=black&logoSize=auto&labelColor=white"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-575-black?style=flat"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-577-black?style=flat"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Lines of Code" src="https://img.shields.io/badge/Lines_Of_Code-498-blue?style=flat"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Comments" src="https://img.shields.io/badge/Lines_Of_Comments-498-blue?style=flat"></a>
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Compression" src="https://img.shields.io/badge/Compression-70.19%25-blue"></a>

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "wplace-bluemarble",
"version": "0.88.77",
"version": "0.88.79",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "wplace-bluemarble",
"version": "0.88.77",
"version": "0.88.79",
"devDependencies": {
"esbuild": "^0.25.0",
"jsdoc": "^4.0.5",

View file

@ -1,6 +1,6 @@
{
"name": "wplace-bluemarble",
"version": "0.88.77",
"version": "0.88.79",
"type": "module",
"homepage": "https://bluemarble.lol/",
"repository": {

View file

@ -2,7 +2,7 @@
// @name Blue Marble
// @name:en Blue Marble
// @namespace https://github.com/SwingTheVine/
// @version 0.88.77
// @version 0.88.79
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @description:en A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine