Skip to content

Commit

Permalink
Merge pull request #59 from toobeeh/develop
Browse files Browse the repository at this point in the history
fix straight mode when chat input active
  • Loading branch information
toobeeh authored Dec 15, 2023
2 parents 7236ddc + bd28a28 commit 2ff5abf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion features/uiTweaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ const uiTweaks = {
ctx.lineWidth = size;
ctx.stroke();
}
}
};
const chatInput = QS(".chat-container input");
let straight = false;
let lastRelease = 0;
let snap = false;
Expand All @@ -652,6 +653,7 @@ const uiTweaks = {
}
// listen for shift down
document.addEventListener("keydown", (event) => {
if (document.activeElement == chatInput) return;
let state = straight;
straight = straight || event.which === 16;
if (straight && !state) preview.use();
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Skribbl Typo",
"description": "The most complete toolbox for skribbl.io with namefinder & Discord integration",
"version": "25.0.5",
"version": "25.0.6",
"author": "tobeh",
"icons": {
"256": "res/icon/256MaxFit.png",
Expand Down
8 changes: 5 additions & 3 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/master/res/icon/128MaxFit.png
// @version 25.0.5.170239597
// @version 25.0.6.170259992
// @updateURL https://raw.githubusercontent.com/toobeeh/skribbltypo/master/skribbltypo.user.js
// @grant none
// @match https://skribbl.io/*
Expand All @@ -24,7 +24,7 @@ const chrome = {
return "https://rawcdn.githack.com/toobeeh/skribbltypo/master/" + url;
},
getManifest: () => {
return {version: "25.0.5 usrsc"};
return {version: "25.0.6 usrsc"};
},
onMessage: {
addListener: (callback) => {
Expand Down Expand Up @@ -6888,7 +6888,8 @@ const uiTweaks = {
ctx.lineWidth = size;
ctx.stroke();
}
}
};
const chatInput = QS(".chat-container input");
let straight = false;
let lastRelease = 0;
let snap = false;
Expand All @@ -6915,6 +6916,7 @@ const uiTweaks = {
}
// listen for shift down
document.addEventListener("keydown", (event) => {
if (document.activeElement == chatInput) return;
let state = straight;
straight = straight || event.which === 16;
if (straight && !state) preview.use();
Expand Down

0 comments on commit 2ff5abf

Please sign in to comment.