mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-05-09 22:50:57 +00:00
Colors are now output to filter window
This commit is contained in:
parent
4aa2d34e22
commit
9599aa4bc3
9 changed files with 62 additions and 15 deletions
18
dist/BlueMarble-For-GreasyFork.user.js
vendored
18
dist/BlueMarble-For-GreasyFork.user.js
vendored
|
|
@ -2,7 +2,7 @@
|
|||
// @name Blue Marble
|
||||
// @name:en Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.88.169
|
||||
// @version 0.88.179
|
||||
// @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
|
||||
|
|
@ -1938,7 +1938,21 @@ Version: ${version}`, "readOnly": true }).buildElement().buildElement().addDiv({
|
|||
button.ontouchend = () => {
|
||||
document.querySelector("#bm-window-filter")?.remove();
|
||||
};
|
||||
}).buildElement().buildElement().addDiv({ "class": "bm-window-content" }).addHeader(1, { "textContent": "Color Filter" }).buildElement().addBr().buildElement().addHr().buildElement().addDiv().buildElement().buildElement().buildOverlay(document.body);
|
||||
}).buildElement().buildElement().addDiv({ "class": "bm-window-content" }).addDiv({ "class": "bm-container" }).addHeader(1, { "textContent": "Color Filter" }).buildElement().buildElement().addHr().buildElement().addDiv({ "class": "bm-container bm-flex-between", "style": "width: fit-content;" }).addButton({ "textContent": "Select All" }, (instance, button) => {
|
||||
button.onclick = () => {
|
||||
};
|
||||
}).buildElement().addButton({ "textContent": "Unselect All" }, (instance, button) => {
|
||||
button.onclick = () => {
|
||||
};
|
||||
}).buildElement().buildElement().addDiv().buildElement().buildElement().buildElement().buildOverlay(document.body);
|
||||
overlayFilter.handleDrag("#bm-window-filter.bm-window", "#bm-window-filter .bm-dragbar");
|
||||
const windowContent = document.querySelector("#bm-window-filter .bm-window-content");
|
||||
const { palette, LUT: _ } = templateManager.paletteBM;
|
||||
const colorList = new Overlay(name, version);
|
||||
colorList.addDiv({ "id": "bm-filter-container-colors", "class": "bm-container" });
|
||||
for (const color of palette) {
|
||||
colorList.addDiv({ "class": "bm-container" }).addP({ "textContent": `Color ID: ${color.id?.toString()?.padStart(2, "0")}, Name: ${color.name}` }).buildElement().buildElement();
|
||||
}
|
||||
colorList.buildOverlay(windowContent);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
4
dist/BlueMarble-Standalone.user.js
vendored
4
dist/BlueMarble-Standalone.user.js
vendored
File diff suppressed because one or more lines are too long
2
dist/BlueMarble.user.css
vendored
2
dist/BlueMarble.user.css
vendored
|
|
@ -1 +1 @@
|
|||
.bm-17{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;top:75px;left:60px;width:auto;max-width:calc(100% - 135px);font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-X{max-width:300px}.bm-15{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.5ch;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:fit-content}.bm-15.bm-10{cursor:grabbing}.bm-17:has(.bm-15.bm-10){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-15.bm-10{pointer-events:auto}.bm-16{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}.bm-17 h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}.bm-15 h1{font-size:1.2em;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:3px 0px rgba(21,48,99,.5),-3px 0px rgba(21,48,99,.5),0px 3px rgba(21,48,99,.5),0px -3px rgba(21,48,99,.5),3px 3px rgba(21,48,99,.5),-3px 3px rgba(21,48,99,.5),3px -3px rgba(21,48,99,.5),-3px -3px rgba(21,48,99,.5)}.bm-15 div:has(h1){display:contents}.bm-_{margin:.5em 0}.bm-17 button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}.bm-17 button:hover,.bm-17 button:focus-visible{background-color:#1061e5}.bm-17 button:active,.bm-17 button:disabled{background-color:#2e97ff}.bm-17 button:disabled{text-decoration:line-through}.bm-T{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}.bm-Z{vertical-align:middle}.bm-Z svg{width:50%;margin:0 auto;fill:#111}input[type=number].bm-V{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}input[type=number].bm-V::-webkit-outer-spin-button,input[type=number].bm-V::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm--)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm--,input[type=file]{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-O{overflow:hidden;transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-17 textarea{font-size:small;background-color:#0003;padding:0 .5ch;height:5.25em;width:100%}.bm-17 small{font-size:x-small;color:#d3d3d3}.bm-W{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.5ch}.bm-flex-center{display:flex;align-content:center;justify-content:center;align-items:center;gap:.5ch}
|
||||
.bm-18{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000;transition:all .3s ease,transform 0s;top:75px;left:60px;width:auto;max-width:calc(100% - 135px);font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-Y{max-width:300px}.bm-16{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.5ch;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:fit-content}.bm-16.bm-11{cursor:grabbing}.bm-18:has(.bm-16.bm-11){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-16.bm-11{pointer-events:auto}.bm-17{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}.bm-18 h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}.bm-16 h1{font-size:1.2em;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:3px 0px rgba(21,48,99,.5),-3px 0px rgba(21,48,99,.5),0px 3px rgba(21,48,99,.5),0px -3px rgba(21,48,99,.5),3px 3px rgba(21,48,99,.5),-3px 3px rgba(21,48,99,.5),3px -3px rgba(21,48,99,.5),-3px -3px rgba(21,48,99,.5)}.bm-16 div:has(h1){display:contents}.bm-10{margin:.5em 0}.bm-18 button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}.bm-18 button:hover,.bm-18 button:focus-visible{background-color:#1061e5}.bm-18 button:active,.bm-18 button:disabled{background-color:#2e97ff}.bm-18 button:disabled{text-decoration:line-through}.bm-U{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}.bm--{vertical-align:middle}.bm-- svg{width:50%;margin:0 auto;fill:#111}input[type=number].bm-W{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}input[type=number].bm-W::-webkit-outer-spin-button,input[type=number].bm-W::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm-_)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm-_,input[type=file]{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-P{overflow:hidden;transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-18 textarea{font-size:small;background-color:#0003;padding:0 .5ch;height:5.25em;width:100%}.bm-18 small{font-size:x-small;color:#d3d3d3}.bm-X{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.5ch}.bm-flex-center{display:flex;align-content:center;justify-content:center;align-items:center;gap:.5ch}
|
||||
|
|
|
|||
4
dist/BlueMarble.user.js
vendored
4
dist/BlueMarble.user.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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-667-black?style=flat"></a>
|
||||
<a href="" target="_blank" rel="noopener noreferrer"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-677-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
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.88.169",
|
||||
"version": "0.88.179",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.88.169",
|
||||
"version": "0.88.179",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"jsdoc": "^4.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.88.169",
|
||||
"version": "0.88.179",
|
||||
"type": "module",
|
||||
"homepage": "https://bluemarble.lol/",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// @name Blue Marble
|
||||
// @name:en Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.88.169
|
||||
// @version 0.88.179
|
||||
// @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
|
||||
|
|
|
|||
39
src/main.js
39
src/main.js
|
|
@ -476,15 +476,48 @@ function buildWindowFilter() {
|
|||
}).buildElement()
|
||||
.buildElement()
|
||||
.addDiv({'class': 'bm-window-content'})
|
||||
.addHeader(1, {'textContent': 'Color Filter'}).buildElement()
|
||||
.addBr().buildElement()
|
||||
.addDiv({'class': 'bm-container'})
|
||||
.addHeader(1, {'textContent': 'Color Filter'}).buildElement()
|
||||
.buildElement()
|
||||
.addHr().buildElement()
|
||||
.addDiv()
|
||||
.addDiv({'class': 'bm-container bm-flex-between', 'style': 'width: fit-content;'})
|
||||
.addButton({'textContent': 'Select All'}, (instance, button) => {
|
||||
button.onclick = () => {
|
||||
|
||||
}
|
||||
}).buildElement()
|
||||
.addButton({'textContent': 'Unselect All'}, (instance, button) => {
|
||||
button.onclick = () => {
|
||||
|
||||
}
|
||||
}).buildElement()
|
||||
.buildElement()
|
||||
.addDiv().buildElement()
|
||||
.buildElement()
|
||||
.buildElement().buildOverlay(document.body);
|
||||
|
||||
// Creates dragging capability on the drag bar for dragging the window
|
||||
overlayFilter.handleDrag('#bm-window-filter.bm-window', '#bm-window-filter .bm-dragbar');
|
||||
|
||||
// Obtains the window content container
|
||||
const windowContent = document.querySelector('#bm-window-filter .bm-window-content');
|
||||
|
||||
// Obtains the palette Blue Marble currently uses
|
||||
const { palette: palette, LUT: _ } = templateManager.paletteBM;
|
||||
|
||||
// Creates the color list container
|
||||
const colorList = new Overlay(name, version);
|
||||
colorList.addDiv({'id': 'bm-filter-container-colors', 'class': 'bm-container'})
|
||||
|
||||
// For each color in the palette, construct the DOM tree
|
||||
for (const color of palette) {
|
||||
colorList.addDiv({'class': 'bm-container'})
|
||||
.addP({'textContent': `Color ID: ${color.id?.toString()?.padStart(2, '0')}, Name: ${color.name}`}).buildElement()
|
||||
.buildElement()
|
||||
}
|
||||
|
||||
// Adds the colors to the color container in the filter window
|
||||
colorList.buildOverlay(windowContent);
|
||||
}
|
||||
|
||||
function buildOverlayTabTemplate() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue