Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/toobeeh/skribbltypo
Browse files Browse the repository at this point in the history
  • Loading branch information
toobeeh committed Apr 24, 2023
2 parents fcf7629 + 30b043a commit 75772ac
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions skribbltypo.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand All @@ -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) => {
Expand Down Expand Up @@ -1495,6 +1495,7 @@ const getEmptyTheme = () => ({
images: {
urlLogo: "",
urlBackground: "",
urlBackgroundGame: "",
backgroundRepeat: true,
containerImages: "",
containerImages: "",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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}" : ""}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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...";
}
Expand Down

0 comments on commit 75772ac

Please sign in to comment.