From 9ec32acad0230ba68b8b451b20f75815b0947a3d Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Fri, 31 Mar 2023 12:12:15 +0000 Subject: [PATCH] Userscript Build Artifacts --- skribbltypo.user.js | 154 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 136 insertions(+), 18 deletions(-) diff --git a/skribbltypo.user.js b/skribbltypo.user.js index f89b2a4..b5f0fbf 100644 --- a/skribbltypo.user.js +++ b/skribbltypo.user.js @@ -5,7 +5,7 @@ // @author tobeh#7437 // @description Userscript version of skribbltypo - the most advanced toolbox for skribbl.io // @icon64 https://rawcdn.githack.com/toobeeh/skribbltypo/d416e4f61888b48a9650e74cf716559904e2fcbf/res/icon/128MaxFit.png -// @version 24.2.2.168020670 +// @version 24.2.3.168026473 // @updateURL https://raw.githubusercontent.com/toobeeh/skribbltypo/master/skribbltypo.userscript.js // @grant none // @match https://skribbl.io/* @@ -24,7 +24,7 @@ const chrome = { return "https://rawcdn.githack.com/toobeeh/skribbltypo/d416e4f61888b48a9650e74cf716559904e2fcbf/" + url; }, getManifest: () => { - return {version: "24.2.2 usrsc"}; + return {version: "24.2.3 usrsc"}; }, onMessage: { addListener: (callback) => { @@ -1457,7 +1457,13 @@ const COLORS = Object.freeze({ "--COLOR_CHAT_SCROLLBAR_THUMB": [0, 0, 78], "--COLOR_CHAT_BG_GUESSED_BASE": [105, 100, 94], "--COLOR_CHAT_BG_GUESSED_ALT": [104, 100, 87], - "--COLOR_CHAT_INPUT_COUNT": [0, 0, 0] + "--COLOR_CHAT_INPUT_COUNT": [0, 0, 0], + "--COLOR_BUTTON_DANGER_BG": [44, 81, 51], + "--COLOR_BUTTON_SUBMIT_BG": [110, 75, 55], + "--COLOR_BUTTON_NORMAL_BG": [208, 80, 54], + "--COLOR_BUTTON_DANGER_TEXT": [0, 0, 100], + "--COLOR_BUTTON_SUBMIT_TEXT": [0, 0, 100], + "--COLOR_BUTTON_NORMAL_TEXT": [0, 0, 100] }); const copyColors = () => JSON.parse(JSON.stringify(COLORS)); @@ -1471,6 +1477,7 @@ const getEmptyTheme = () => ({ images: { urlLogo: "", urlBackground: "", + backgroundRepeat: false, containerImages: "", containerImages: "", backgroundTint: "transparent" @@ -1483,7 +1490,10 @@ const getEmptyTheme = () => ({ hideAvatarLogo: false, hideInGameLogo: false, hideAvatarSprites: false, - themeCssUrl: "" + themeCssUrl: "", + themeCss: "", + hideMeta: false, + cssText: "" }, hooks: Object.keys(COLORS).map(k => ({ color: k, css: "" })).reduce((acc, { color, css }) => { acc[color] = css; @@ -1569,6 +1579,8 @@ const simpleThemeColors = (mainHsl, textHsl, useIngame = false, useInputs = fals mains.forEach(k => theme[k][0] = (theme[k][0] - mainHueBase + mainHue) % 360); mains.forEach(k => theme[k][1] = theme[k][1] * (mainSat / 100)); mains.forEach(k => theme[k][2] = theme[k][2] * (mainLig / 100)); + theme["--COLOR_CHAT_SCROLLBAR"] = [...theme["--COLOR_PANEL_LO"]]; + theme["--COLOR_CHAT_SCROLLBAR_THUMB"] = [...theme["--COLOR_PANEL_HI"]]; if (useIngame) { const themeSat = mainSatBase * (mainSat / 100); @@ -1633,6 +1645,8 @@ const visuals = { visuals.refreshThemeContainer(); }); entry.querySelector(".orange").addEventListener("click", () => { + const result = confirm("Delete theme " + theme.meta.name + "?"); + if (!result) return; visuals.deleteTheme(theme.meta.id); visuals.applyOptions(visuals.themes.find(t => t.meta.id == 0)); }); @@ -1710,6 +1724,9 @@ const visuals = { case "fontStyle": elem.value = theme.misc.fontStyle; break; + case "cssText": + elem.value = theme.misc.cssText; + break; case "cssUrl": elem.value = theme.misc.themeCssUrl; break; @@ -1731,6 +1748,12 @@ const visuals = { case "hideAvatarSprites": elem.checked = theme.misc.hideAvatarSprites; break; + case "hideMeta": + elem.checked = theme.misc.hideMeta; + break; + case "backgroundRepeat": + elem.checked = theme.images.backgroundRepeat; + break; } }); @@ -1818,6 +1841,11 @@ const visuals = { + + + + + +