diff --git a/skribbltypo.user.js b/skribbltypo.user.js index 8bc686a..96eef4c 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.3.1.168184603 +// @version 24.3.2.168190454 // @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.3.1 usrsc"}; + return {version: "24.3.2 usrsc"}; }, onMessage: { addListener: (callback) => { @@ -1495,6 +1495,7 @@ const getEmptyTheme = () => ({ images: { urlLogo: "", urlBackground: "", + urlBackgroundGame: "", backgroundRepeat: true, containerImages: "", containerImages: "", @@ -1849,6 +1850,7 @@ const visuals = { elem.value = theme.images.urlBackground; break; case "urlBackgroundGame": + elem.value = theme.images.urlBackgroundGame; break; case "containerImages": elem.value = theme.images.containerImages; @@ -2146,6 +2148,7 @@ const visuals = { visuals.currentEditor.images.urlBackground = elem.value; break; case "urlBackgroundGame": + visuals.currentEditor.images.urlBackgroundGame = elem.value; break; case "containerImages": visuals.currentEditor.images.containerImages = elem.value; @@ -2586,11 +2589,14 @@ const visuals = { inset: 0; background-position: center; background-image: url(${theme.images.urlBackground != "" ? theme.images.urlBackground : "/img/background.png"}); - background-repeat: ${theme.images.urlBackground != "" || !theme.images.backgroundRepeat ? "no-repeat" : "repeat"}; - background-size: ${theme.images.urlBackground != "" || !theme.images.backgroundRepeat ? "cover" : "350px"}; + background-repeat: ${theme.images.urlBackground == "" || theme.images.backgroundRepeat ? "repeat" : "no-repeat"}; + background-size: ${theme.images.urlBackground == "" ? "350px" : theme.images.backgroundRepeat ? "auto" : "cover"}; mix-blend-mode: ${theme.images.backgroundTint == "transparent" ? "none" : "multiply"}; filter: ${theme.images.backgroundTint == "transparent" ? "none" : "saturate(0%)"}; } + #typoThemeBg.ingame${theme.images.urlBackgroundGame != "" ? "" : ".disabled"}::after { + background-image: url(${theme.images.urlBackgroundGame}); + } ${theme.misc.hideFooter ? ".tos, .notice {display:none}" : ""} @@ -2650,7 +2656,7 @@ const visuals = { ${theme.images.urlLogo != "" ? "div.logo-big img {max-height:20vh}" : ""} - ${Object.keys(theme.hooks ? theme.hooks : {}).filter(key => theme.hooks[key] != "").map(key => `${SKRIBBL_HOOKS[key].join(",")}{${theme.hooks[key]}}`)} + ${Object.keys(theme.hooks ? theme.hooks : {}).filter(key => theme.hooks[key] != "").map(key => `${SKRIBBL_HOOKS[key].join(",")}{${theme.hooks[key]}}`).join("\n")} ::-webkit-scrollbar { width: 14px; @@ -4820,12 +4826,12 @@ bounceload { } .lobbyNavIcon.next { - filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .3)) drop-shadow(rgba(0, 0, 0, 0.3) 3px 3px 0px) sepia(1) saturate(5) brightness(0.7) hue-rotate(56deg); + filter: drop-shadow(3px -3px 0 rgba(0, 0, 0, .3)) drop-shadow(rgba(0, 0, 0, 0.3) 3px 3px 0px) sepia(1) saturate(5) brightness(0.7) hue-rotate(56deg); rotate: 90deg; } .lobbyNavIcon.exit { - filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .3)) sepia(1) saturate(5) brightness(0.8) hue-rotate(324deg); + filter: drop-shadow(-3px 3px 0 rgba(0, 0, 0, .3)) sepia(1) saturate(5) brightness(0.8) hue-rotate(324deg); rotate: -90deg; } @@ -6838,6 +6844,12 @@ const uiTweaks = { QS("#game-chat > div.chat-container > form > input[type=text]").setAttribute("maxlength", 300); + const GAME = QS("#game"); + var gameObserver = new MutationObserver(() => { + QS("#typoThemeBg")?.classList.toggle("ingame", GAME.style.display != "none"); + }); + gameObserver.observe(GAME, { attributes: true, childList: false }); + // random easteregg if (Math.random() < 0.1) QS("#game-chat .chat-container form input").placeholder = "Typo your guess here..."; }