// ==UserScript==
// @name Skribbl.io Cheats
// @namespace https://nohesi.lol
// @version 2025-04-11
// @description Updated as of 2025 April 11th CHECK BACK DAILY FOR UPDATES!
// @author bleh2rich
// @match *://*.skribbl.io/*
// @icon https://raw.githubusercontent.com/blmpsaa/skribbl/refs/heads/main/icon.jpg
// @license Copyright (c) 2025 bleh2rich. All rights reserved.
// @grant unsafeWindow
// @run-at document-idle
// ==/UserScript==
javascript:(function() {
const charWidthRatio = 0.6;
const charHeightRatio = 1.0;
const lineDelay = 30;
const charSpacingFactor = 1.1;
const lineSpacingFactor = 1.4;
const spaceWidthFactor = 0.5;
const maxLines = 10;
const safetyMarginFactor = 0.9;
const defaultAutoguessDelay = 1000;
const wordDbResultsMaxHeight = '300px';
const WORD_DATABASE_CSV_STRING = `word,count,
ace,3,
ant,3,
arm,3,
ash,3,
axe,3,
bad,3,
bag,3,
bar,3,
bat,3,
bed,3,
bee,3,
BMW,3,
BMX,3,
bow,3,
box,3,
boy,3,
bus,3,
can,3,
cap,3,
cat,3,
cow,3,
cup,3,
cut,3,
day,3,
dry,3,
dew,3,
die,3,
dig,3,
DNA,3,
dog,3,
ear,3,
eat,3,
eel,3,
egg,3,
emu,3,
end,3,
eye,3,
flu,3,
fly,3,
fog,3,
fox,3,
fur,3,
gas,3,
gem,3,
God,3,
Gru,3,
ham,3,
hat,3,
hen,3,
hop,3,
hot,3,
hug,3,
hut,3,
ice,3,
ivy,3,
jaw,3,
keg,3,
key,3,
KFC,3,
lap,3,
lid,3,
log,3,
low,3,
map,3,
mop,3,
MTV,3,
mud,3,
mug,3,
nun,3,
nut,3,
oar,3,
oil,3,
old,3,
owl,3,
pan,3,
paw,3,
pie,3,
pig,3,
pin,3,
pot,3,
pro,3,
pub,3,
ram,3,
rim,3,
rat,3,
red,3,
rib,3,
rug,3,
run,3,
sad,3,
sea,3,
sew,3,
shy,3,
sit,3,
ski,3,
sky,3,
son,3,
soy,3,
spy,3,
sun,3,
tea,3,
tie,3,
tip,3,
toe,3,
toy,3,
tug,3,
UFO,3,
USB,3,
wax,3,
web,3,
wig,3,
zoo,3,
gru,3,
ivy,3,
ABBA,4,
acid,4,
acne,4,
afro,4,
arch,4,
army,4,
Asia,4,
atom,4,
Audi,4,
baby,4,
bait,4,
bald,4,
ball,4,
bank,4,
bark,4,
barn,4,
base,4,
beak,4,
bean,4,
bear,4,
beef,4,
beer,4,
beet,4,
bell,4,
belt,4,
bill,4,
bird,4,
bite,4,
blue,4,
boar,4,
boat,4,
boil,4,
bomb,4,
book,4,
bowl,4,
bull,4,
buff,4,
burp,4,
cage,4,
cake,4,
cape,4,
cash,4,
cast,4,
cave,4,
cell,4,
chef,4,
chew,4,
chin,4,
clap,4,
claw,4,
clay,4,
coal,4,
coat,4,
coin,4,
cola,4,
cold,4,
comb,4,
cone,4,
copy,4,
cord,4,
cork,4,
corn,4,
crab,4,
crow,4,
Cuba,4,
cube,4,
cute,4,
dead,4,
deaf,4,
deep,4,
deer,4,
dent,4,
derp,4,
desk,4,
dice,4,
diet,4,
diva,4,
dock,4,
doll,4,
dome,4,
door,4,
Dora,4,
dots,4,
drip,4,
drum,4,
duck,4,
dusk,4,
duel,4,
east,4,
echo,4,
Elmo,4,
Elsa,4,
exam,4,
face,4,
fall,4,
farm,4,
fast,4,
fern,4,
Finn,4,
fish,4,
fizz,4,
flag,4,
flea,4,
foil,4,
food,4,
foam,4,
fork,4,
fort,4,
frog,4,
full,4,
gang,4,
gasp,4,
gate,4,
germ,4,
gift,4,
girl,4,
glow,4,
glue,4,
goal,4,
goat,4,
gold,4,
golf,4,
good,4,
grid,4,
grin,4,
hair,4,
half,4,
halo,4,
hand,4,
hard,4,
harp,4,
head,4,
heat,4,
heel,4,
hell,4,
hero,4,
hill,4,
hive,4,
hoof,4,
hook,4,
horn,4,
hose,4,
Hulk,4,
hurt,4,
idea,4,
Ikea,4,
iPad,4,
iron,4,
jail,4,
JayZ,4,
jazz,4,
jeep,4,
king,4,
kiss,4,
kite,4,
kiwi,4,
knee,4,
knot,4,
lady,4,
lake,4,
lamb,4,
lamp,4,
lane,4,
lava,4,
leaf,4,
leak,4,
Lego,4,
legs,4,
lens,4,
lily,4,
lime,4,
line,4,
link,4,
lion,4,
lips,4,
loaf,4,
lock,4,
logo,4,
loot,4,
love,4,
luck,4,
lung,4,
lynx,4,
maid,4,
mail,4,
mall,4,
Mars,4,
mask,4,
maze,4,
meal,4,
meat,4,
melt,4,
meme,4,
milk,4,
mime,4,
mint,4,
mold,4,
mole,4,
monk,4,
moon,4,
moss,4,
moth,4,
nail,4,
Nasa,4,
navy,4,
neck,4,
Nemo,4,
nerd,4,
nest,4,
Nike,4,
noob,4,
nose,4,
nuke,4,
Olaf,4,
open,4,
ogre,4,
orca,4,
Oreo,4,
oval,4,
page,4,
pain,4,
palm,4,
park,4,
path,4,
pear,4,
peas,4,
pike,4,
pill,4,
pine,4,
pink,4,
pipe,4,
plow,4,
plug,4,
poke,4,
polo,4,
pond,4,
pony,4,
poop,4,
poor,4,
pope,4,
pray,4,
puma,4,
punk,4,
race,4,
raft,4,
rail,4,
rain,4,
rake,4,
ramp,4,
read,4,
road,4,
rest,4,
rice,4,
riot,4,
Rick,4,
ring,4,
risk,4,
rock,4,
roll,4,
Rome,4,
roof,4,
room,4,
root,4,
rose,4,
ruby,4,
rune,4,
safe,4,
sale,4,
salt,4,
save,4,
sand,4,
scar,4,
seal,4,
seed,4,
shoe,4,
shop,4,
sick,4,
silo,4,
sing,4,
sink,4,
skin,4,
slam,4,
slow,4,
snow,4,
soap,4,
soda,4,
soil,4,
soup,4,
spin,4,
spit,4,
stab,4,
star,4,
step,4,
swag,4,
swan,4,
taco,4,
tail,4,
tall,4,
tank,4,
tape,4,
taxi,4,
tear,4,
tent,4,
text,4,
thin,4,
Thor,4,
thug,4,
tiny,4,
tire,4,
toad,4,
tomb,4,
trap,4,
tree,4,
tuba,4,
tuna,4,
turd,4,
twig,4,
type,4,
undo,4,
vein,4,
vent,4,
vine,4,
vise,4,
vote,4,
walk,4,
wall,4,
warm,4,
wart,4,
wasp,4,
wave,4,
weak,4,
well,4,
west,4,
wife,4,
wind,4,
wine,4,
wing,4,
wire,4,
wolf,4,
wool,4,
work,4,
worm,4,
Xbox,4,
yawn,4,
yeti,4,
Yoda,4,
yolk,4,
Zeus,4,
zoom,4,
Zuma,4,
ABBA,4,
acid,4,
bull,4,4
farm,4,
nose,4,
pain,4,
reed,4,
rice,4,
worm,4,
zuma,4,
abyss,5,
AC/DC,5,
acorn,5,
actor,5,
adult,5,
alarm,5,
alien,5,
alley,5,
angel,5,
angry,5,
anime,5,
anvil,5,
Apple,5,
armor,5,
arrow,5,
attic,5,
bacon,5,
bagel,5,
Bambi,5,
banjo,5,
beach,5,
belly,5,
below,5,
bench,5,
Bible,5,
bingo,5,
birch,5,
black,5,
blimp,5,
blind,5,
blood,5,
blush,5,
board,5,
boots,5,
brain,5,
braid,5,
brand,5,
bread,5,
brick,5,
bride,5,
broom,5,
brush,5,
bulge,5,
bunny,5,
cabin,5,
camel,5,
cello,5,
chain,5,
chair,5,
chalk,5,
cheek,5,
chess,5,
chest,5,
child,5,
chime,5,
China,5,
clean,5,
cliff,5,
climb,5,
cloak,5,
clock,5,
cloth,5,
cloud,5,
clown,5,
coach,5,
coast,5,
cobra,5,
comet,5,
coral,5,
crack,5,
crate,5,
cream,5,
crust,5,
Cupid,5,
curry,5,
daisy,5,
dance,5,
darts,5,
demon,5,
dirty,5,
dizzy,5,
dough,5,
drain,5,
drama,5,
dream,5,
dress,5,
drink,5,
drive,5,
drool,5,
donut,5,
Dumbo,5,
dwarf,5,
eagle,5,
Earth,5,
Egypt,5,
elbow,5,
elder,5,
emoji,5,
error,5,
fairy,5,
Fanta,5,
fence,5,
field,5,
Flash,5,
flask,5,
flock,5,
fluid,5,
flush,5,
flute,5,
frame,5,
fries,5,
frown,5,
fruit,5,
funny,5,
genie,5,
ghost,5,
giant,5,
glass,5,
globe,5,
gloss,5,
glove,5,
gnome,5,
Goofy,5,
goose,5,
graph,5,
grass,5,
grave,5,
greed,5,
grill,5,
groom,5,
gummy,5,
hairy,5,
happy,5,
heart,5,
heist,5,
hippo,5,
honey,5,
horse,5,
hotel,5,
house,5,
hyena,5,
India,5,
Intel,5,
Italy,5,
Japan,5,
jeans,5,
jello,5,
jelly,5,
Jenga,5,
joker,5,
judge,5,
juice,5,
kazoo,5,
kebab,5,
Kirby,5,
kneel,5,
knife,5,
koala,5,
label,5,
laser,5,
lasso,5,
leash,5,
leave,5,
leech,5,
lemon,5,
lemur,5,
limbo,5,
llama,5,
loser,5,
Luigi,5,
macho,5,
mafia,5,
magic,5,
magma,5,
Mario,5,
match,5,
mayor,5,
melon,5,
messy,5,
metal,5,
miner,5,
model,5,
money,5,
moose,5,
Morty,5,
mouse,5,
mouth,5,
movie,5,
Mummy,5,
night,5,
ninja,5,
north,5,
Notch,5,
novel,5,
nurse,5,
ocean,5,
onion,5,
opera,5,
orbit,5,
organ,5,
otter,5,
paint,5,
panda,5,
pants,5,
paper,5,
Paris,5,
party,5,
pasta,5,
patio,5,
pause,5,
peace,5,
peach,5,
pedal,5,
penny,5,
Pepsi,5,
petal,5,
piano,5,
pilot,5,
pinky,5,
pizza,5,
plank,5,
plate,5,
Pluto,5,
point,5,
poppy,5,
porch,5,
pound,5,
prawn,5,
prism,5,
prune,5,
Pumba,5,
Pylon,5,
purse,5,
queen,5,
queue,5,
quill,5,
quilt,5,
radar,5,
radio,5,
razor,5,
reeds,5,
river,5,
robin,5,
robot,5,
royal,5,
ruler,5,
salad,5,
Santa,5,
sauce,5,
sauna,5,
scarf,5,
scary,5,
scent,5,
scoop,5,
score,5,
screw,5,
scuba,5,
shake,5,
shape,5,
shark,5,
sheep,5,
shelf,5,
shell,5,
shirt,5,
shock,5,
short,5,
shout,5,
Shrek,5,
shrew,5,
shrub,5,
skull,5,
skunk,5,
Skype,5,
sleep,5,
slide,5,
slime,5,
slope,5,
sloth,5,
slump,5,
smell,5,
smile,5,
smoke,5,
snail,5,
snake,5,
socks,5,
Sonic,5,
sound,5,
south,5,
space,5,
spade,5,
Spain,5,
spark,5,
spear,5,
spine,5,
spool,5,
spoon,5,
spore,5,
squid,5,
stage,5,
stamp,5,
stand,5,
Steam,5,
sting,5,
stone,5,
stork,5,
storm,5,
stove,5,
straw,5,
study,5,
sugar,5,
sushi,5,
swamp,5,
swarm,5,
sweat,5,
swing,5,
sword,5,
table,5,
Tails,5,
taser,5,
thief,5,
think,5,
thumb,5,
tiger,5,
tired,5,
toast,5,
tooth,5,
torch,5,
totem,5,
touch,5,
towel,5,
tower,5,
train,5,
trend,5,
T-rex,5,
truck,5,
tumor,5,
udder,5,
uncle,5,
vault,5,
Venus,5,
video,5,
viola,5,
virus,5,
vodka,5,
vomit,5,
waist,5,
watch,5,
water,5,
whale,5,
wheel,5,
whisk,5,
white,5,
witch,5,
W-LAN,5,
world,5,
whole,5,
wound,5,
wrist,5,
Xerox,5,
x-ray,5,
yacht,5,
Yoshi,5,
young,5,
yo-yo,5,
zebra,5,
Zelda,5,
Zorro,5,
nurse,5,
pound,5,
space,5,
squid,5,
trend,5,
action,6,
Adidas,6,
Africa,6,
airbag,6,
almond,6,
alpaca,6,
anchor,6,
Anubis,6,
archer,6,
armpit,6,
baboon,6,
badger,6,
bakery,6,
ballet,6,
bamboo,6,
banana,6,
banker,6,
barber,6,
barrel,6,
basket,6,
Batman,6,
battle,6,
beanie,6,
beaver,6,
beetle,6,
bellow,6,
betray,6,
bleach,6,
booger,6,
border,6,
bottle,6,
bounce,6,
Bowser,6,
braces,6,
branch,6,
Brazil,6,
breath,6,
bridge,6,
bronze,6,
bruise,6,
bubble,6,
bucket,6,
bullet,6,
bumper,6,
butler,6,
butter,6,
button,6,
cactus,6,
camera,6,
Canada,6,
canary,6,
candle,6,
cannon,6,
canyon,6,
carpet,6,
carrot,6,
casino,6,
caviar,6,
cement,6,
cheeks,6,
cheese,6,
cherry,6,
Chrome,6,
church,6,
cicada,6,
cinema,6,
circle,6,
circus,6,
clover,6,
cocoon,6,
coffee,6,
coffin,6,
collar,6,
comedy,6,
cookie,6,
copper,6,
corner,6,
corpse,6,
cotton,6,
cousin,6,
cowboy,6,
coyote,6,
crayon,6,
credit,6,
cringe,6,
cruise,6,
cuckoo,6,
cyborg,6,
cymbal,6,
dagger,6,
Darwin,6,
desert,6,
Dexter,6,
diaper,6,
dinner,6,
doctor,6,
dollar,6,
donkey,6,
double,6,
dragon,6,
drawer,6,
driver,6,
earwax,6,
Easter,6,
embers,6,
Eminem,6,
engine,6,
eraser,6,
eskimo,6,
Europe,6,
fabric,6,
facade,6,
family,6,
farmer,6,
father,6,
faucet,6,
filter,6,
finger,6,
flower,6,
folder,6,
forest,6,
fossil,6,
France,6,
fridge,6,
galaxy,6,
Gandhi,6,
garage,6,
garden,6,
garlic,6,
gender,6,
gentle,6,
geyser,6,
goatee,6,
goblin,6,
Google,6,
grapes,6,
gravel,6,
Greece,6,
Grinch,6,
grumpy,6,
guitar,6,
hacker,6,
hammer,6,
handle,6,
hanger,6,
harbor,6,
Hawaii,6,
hazard,6,
health,6,
helmet,6,
hermit,6,
hippie,6,
hobbit,6,
hockey,6,
hunger,6,
hunter,6,
hurdle,6,
icicle,6,
impact,6,
impale,6,
insect,6,
inside,6,
iPhone,6,
island,6,
Israel,6,
jacket,6,
jaguar,6,
jester,6,
juggle,6,
jungle,6,
karate,6,
katana,6,
Kermit,6,
kettle,6,
kidney,6,
kitten,6,
knight,6,
kraken,6,
ladder,6,
laptop,6,
lawyer,6,
leader,6,
lizard,6,
London,6,
lotion,6,
lounge,6,
lyrics,6,
magnet,6,
makeup,6,
mantis,6,
marble,6,
market,6,
marmot,6,
mascot,6,
Medusa,6,
Mexico,6,
Minion,6,
minute,6,
mirror,6,
mohawk,6,
Monday,6,
monkey,6,
mother,6,
Mozart,6,
muffin,6,
muscle,6,
museum,6,
musket,6,
nachos,6,
napkin,6,
NASCAR,6,
nature,6,
needle,6,
nether,6,
nickel,6,
noodle,6,
Norway,6,
nugget,6,
nutmeg,6,
Obelix,6,
online,6,
office,6,
omelet,6,
orange,6,
orchid,6,
oxygen,6,
oyster,6,
paddle,6,
palace,6,
papaya,6,
parade,6,
parrot,6,
pastry,6,
Paypal,6,
peanut,6,
pencil,6,
pepper,6,
person,6,
pickle,6,
picnic,6,
pigeon,6,
pigsty,6,
pillar,6,
pillow,6,
pimple,6,
pirate,6,
pistol,6,
plague,6,
planet,6,
player,6,
pocket,6,
poison,6,
poodle,6,
Popeye,6,
portal,6,
poster,6,
pollen,6,
poland,6,
potato,6,
potion,6,
powder,6,
preach,6,
priest,6,
prince,6,
prison,6,
puddle,6,
puffin,6,
puppet,6,
purity,6,
puzzle,6,
quokka,6,
radish,6,
raisin,6,
rapper,6,
record,6,
Reddit,6,
remote,6,
repeat,6,
retail,6,
rewind,6,
ribbon,6,
robber,6,
rocket,6,
rubber,6,
Russia,6,
saddle,6,
safari,6,
saliva,6,
salmon,6,
Saturn,6,
school,6,
scream,6,
screen,6,
scythe,6,
search,6,
season,6,
second,6,
seesaw,6,
Segway,6,
sensei,6,
server,6,
shadow,6,
shovel,6,
shower,6,
silver,6,
skates,6,
skinny,6,
sledge,6,
sleeve,6,
Slinky,6,
sneeze,6,
sniper,6,
soccer,6,
socket,6,
sphinx,6,
spider,6,
spiral,6,
sponge,6,
sports,6,
spring,6,
square,6,
stable,6,
statue,6,
stereo,6,
stoned,6,
street,6,
stress,6,
strong,6,
studio,6,
stylus,6,
subway,6,
Sudoku,6,
summer,6,
switch,6,
tablet,6,
tailor,6,
tampon,6,
target,6,
Tarzan,6,
tattoo,6,
teapot,6,
tennis,6,
Tetris,6,
thirst,6,
throat,6,
throne,6,
ticket,6,
tickle,6,
tissue,6,
toilet,6,
tomato,6,
tongue,6,
toucan,6,
tripod,6,
trophy,6,
tunnel,6,
turkey,6,
turnip,6,
turtle,6,
tuxedo,6,
Tweety,6,
Uranus,6,
vacuum,6,
valley,6,
vanish,6,
victim,6,
violin,6,
vision,6,
volume,6,
voodoo,6,
vortex,6,
waffle,6,
waiter,6,
Wall-e,6,
walnut,6,
walrus,6,
wealth,6,
weapon,6,
weasel,6,
welder,6,
wiggle,6,
willow,6,
window,6,
winner,6,
winter,6,
wizard,6,
wreath,6,
wrench,6,
writer,6,
yellow,6,
yogurt,6,
zigzag,6,
zipper,6,
zombie,6,
Addida,6,
gentle,6,
Grinch,6,
repeat,6,
Tarzan,6,
airport,7,
Aladdin,7,
alcohol,7,
allergy,7,
America,7,
Android,7,
antenna,7,
anthill,7,
apricot,7,
assault,7,
Asterix,7,
athlete,7,
avocado,7,
baklava,7,
balance,7,
balcony,7,
balloon,7,
bandage,7,
bandana,7,
barcode,7,
bathtub,7,
battery,7,
bayonet,7,
bazooka,7,
beatbox,7,
bed bug,7,
bedtime,7,
bicycle,7,
Big Ben,7,
biology,7,
biscuit,7,
Bitcoin,7,
blanket,7,
blender,7,
bobsled,7,
bouncer,7,
bowling,7,
brownie,7,
Britain,7,
burglar,7,
burrito,7,
butcher,7,
cabinet,7,
camping,7,
captain,7,
cartoon,7,
cashier,7,
catalog,7,
catfish,7,
caveman,7,
ceiling,7,
centaur,7,
charger,7,
cheetah,7,
chicken,7,
chimney,7,
coaster,7,
coconut,7,
compass,7,
concert,7,
console,7,
country,7,
cowbell,7,
Creeper,7,
cricket,7,
Croatia,7,
crowbar,7,
crystal,7,
cupcake,7,
curtain,7,
cushion,7,
defense,7,
dentist,7,
dessert,7,
diagram,7,
diamond,7,
diploma,7,
Discord,7,
disease,7,
dishrag,7,
display,7,
divorce,7,
dolphin,7,
Doritos,7,
Dracula,7,
droplet,7,
drought,7,
earbuds,7,
eclipse,7,
emerald,7,
England,7,
equator,7,
evening,7,
eyebrow,7,
eyelash,7,
factory,7,
failure,7,
feather,7,
fencing,7,
Ferrari,7,
firefly,7,
fireman,7,
Florida,7,
florist,7,
fortune,7,
freezer,7,
funeral,7,
Gandalf,7,
garbage,7,
Germany,7,
giraffe,7,
glasses,7,
glitter,7,
gorilla,7,
gravity,7,
grenade,7,
Gumball,7,
haircut,7,
hammock,7,
hamster,7,
harpoon,7,
hashtag,7,
heading,7,
hexagon,7,
highway,7,
hip hop,7,
holiday,7,
horizon,7,
hot dog,7,
husband,7,
iceberg,7,
Ireland,7,
janitor,7,
jet ski,7,
journey,7,
karaoke,7,
kendama,7,
ketchup,7,
kitchen,7,
knuckle,7,
Kung Fu,7,
give up,7,
ladybug,7,
lantern,7,
Lasagna,7,
laundry,7,
leather,7,
lettuce,7,
library,7,
lighter,7,
lilypad,7,
loading,7,
lobster,7,
lottery,7,
luggage,7,
machine,7,
mailbox,7,
mailman,7,
mammoth,7,
manatee,7,
manhole,7,
mansion,7,
maracas,7,
massage,7,
meerkat,7,
Mercury,7,
mermaid,7,
message,7,
milkman,7,
minivan,7,
Morocco,7,
missile,7,
monster,7,
morning,7,
Mr Bean,7,
mustard,7,
narwhal,7,
Neptune,7,
network,7,
notepad,7,
nothing,7,
Nutella,7,
octagon,7,
octopus,7,
origami,7,
ostrich,7,
outside,7,
Pac-Man,7,
pajamas,7,
palette,7,
pancake,7,
panther,7,
parents,7,
parasol,7,
parking,7,
patient,7,
Patrick,7,
patriot,7,
peacock,7,
peasant,7,
pelican,7,
penguin,7,
perfume,7,
Picasso,7,
pickaxe,7,
Pikachu,7,
pinball,7,
plumber,7,
plunger,7,
Pokemon,7,
popcorn,7,
popular,7,
present,7,
pretzel,7,
printer,7,
protest,7,
provoke,7,
pudding,7,
pumpkin,7,
pyramid,7,
quarter,7,
raccoon,7,
racecar,7,
rainbow,7,
ravioli,7,
reality,7,
referee,7,
reptile,7,
Romania,7,
rooster,7,
Samsung,7,
sandbox,7,
sausage,7,
science,7,
seafood,7,
seagull,7,
seasick,7,
seaweed,7,
shallow,7,
shampoo,7,
shoebox,7,
shotgun,7,
silence,7,
skyline,7,
snowman,7,
soldier,7,
spatula,7,
speaker,7,
spinach,7,
spoiler,7,
stadium,7,
stapler,7,
stomach,7,
student,7,
sunburn,7,
sunrise,7,
surface,7,
surgeon,7,
sweater,7,
tadpole,7,
teacher,7,
thunder,7,
timpani,7,
Titanic,7,
theatre,7,
toaster,7,
toenail,7,
toolbox,7,
top hat,7,
tornado,7,
torpedo,7,
tourist,7,
tractor,7,
traffic,7,
trailer,7,
trigger,7,
trumpet,7,
Twitter,7,
Ukraine,7,
ukulele,7,
unibrow,7,
unicorn,7,
uniform,7,
upgrade,7,
vaccine,7,
vampire,7,
vanilla,7,
Vatican,7,
victory,7,
village,7,
villain,7,
vinegar,7,
vitamin,7,
vlogger,7,
volcano,7,
vulture,7,
wake up,7,
weather,7,
website,7,
wedding,7,
western,7,
whisper,7,
whistle,7,
wingnut,7,
witness,7,
wrinkle,7,
Youtube,7,
zipline,7,
mermaid,7,
nothing,7,
pancake,7,
abstract,8,
accident,8,
addition,8,
adorable,8,
aircraft,8,
airplane,8,
anaconda,8,
anteater,8,
antelope,8,
applause,8,
aquarium,8,
assassin,8,
asteroid,8,
Atlantis,8,
audience,8,
backbone,8,
backflip,8,
backpack,8,
bagpipes,8,
baguette,8,
Band-Aid,8,
barbecue,8,
basement,8,
bathroom,8,
bean bag,8,
birthday,8,
blizzard,8,
blowfish,8,
bookmark,8,
bracelet,8,
broccoli,8,
brunette,8,
building,8,
bunk bed,8,
bus stop,8,
calendar,8,
campfire,8,
canister,8,
car wash,8,
carnival,8,
catapult,8,
cauldron,8,
Cerberus,8,
chainsaw,8,
champion,8,
chemical,8,
chestnut,8,
clarinet,8,
cocktail,8,
collapse,8,
comedian,8,
complete,8,
computer,8,
confused,8,
corn dog,8,
crossbow,8,
crucible,8,
cucumber,8,
cupboard,8,
customer,8,
cylinder,8,
dandruff,8,
daughter,8,
Deadpool,8,
delivery,8,
detonate,8,
diagonal,8,
dinosaur,8,
disaster,8,
distance,8,
doghouse,8,
dominoes,8,
doorknob,8,
download,8,
drum kit,8,
dynamite,8,
eggplant,8,
Einstein,8,
election,8,
elephant,8,
elevator,8,
employer,8,
engineer,8,
espresso,8,
exercise,8,
fabulous,8,
Facebook,8,
festival,8,
figurine,8,
fireball,8,
fireside,8,
firework,8,
flagpole,8,
flamingo,8,
forehead,8,
fortress,8,
fountain,8,
freckles,8,
frosting,8,
gangster,8,
gardener,8,
Garfield,8,
gas mask,8,
gasoline,8,
goldfish,8,
graffiti,8,
handicap,8,
hard hat,8,
hay bale,8,
hazelnut,8,
headache,8,
headband,8,
hedgehog,8,
Hercules,8,
homeless,8,
hospital,8,
industry,8,
infinite,8,
insomnia,8,
internet,8,
invasion,8,
Iron Man,8,
jalapeno,8,
kangaroo,8,
keyboard,8,
landlord,8,
language,8,
lemonade,8,
leggings,8,
levitate,8,
licorice,8,
lipstick,8,
lollipop,8,
macaroni,8,
magazine,8,
magician,8,
manicure,8,
marathon,8,
marigold,8,
matchbox,8,
mattress,8,
meatball,8,
meatloaf,8,
mechanic,8,
Mercedes,8,
midnight,8,
military,8,
Miniclip,8,
minigolf,8,
minority,8,
Minotaur,8,
mosquito,8,
mothball,8,
mountain,8,
Mr. Bean,8,
murderer,8,
mushroom,8,
mustache,8,
neighbor,8,
nostrils,8,
notebook,8,
nutshell,8,
panpipes,8,
parakeet,8,
password,8,
passport,8,
pavement,8,
pendulum,8,
pet food,8,
pet shop,8,
pinwheel,8,
platypus,8,
plankton,8,
ponytail,8,
Popsicle,8,
portrait,8,
Portugal,8,
Poseidon,8,
positive,8,
postcard,8,
pregnant,8,
princess,8,
Pringles,8,
raincoat,8,
raindrop,8,
reindeer,8,
religion,8,
revolver,8,
ringtone,8,
rockstar,8,
sailboat,8,
sandwich,8,
scissors,8,
Scotland,8,
scribble,8,
sea lion,8,
seahorse,8,
seashell,8,
security,8,
shoelace,8,
shopping,8,
shoulder,8,
six pack,8,
skeleton,8,
ski jump,8,
Skittles,8,
Skrillex,8,
slippers,8,
slippery,8,
snowball,8,
sombrero,8,
sparkles,8,
squirrel,8,
starfish,8,
stingray,8,
streamer,8,
suitcase,8,
sunshade,8,
Superman,8,
survivor,8,
swimsuit,8,
symphony,8,
tabletop,8,
take off,8,
teaspoon,8,
tentacle,8,
tiramisu,8,
tortoise,8,
trapdoor,8,
traveler,8,
treasure,8,
triangle,8,
tricycle,8,
triplets,8,
trombone,8,
tropical,8,
umbrella,8,
unicycle,8,
universe,8,
vacation,8,
vertical,8,
violence,8,
vuvuzela,8,
werewolf,8,
WhatsApp,8,
windmill,8,
wireless,8,
wrapping,8,
wrestler,8,
yearbook,8,
youtuber,8,
zeppelin,8,
antelope,8,
marathon,8,
accordion,9,
addiction,9,
afterlife,9,
albatross,9,
alligator,9,
ambulance,9,
Amsterdam,9,
animation,9,
antivirus,9,
apartment,9,
apple pie,9,
architect,9,
Argentina,9,
armadillo,9,
astronaut,9,
asymmetry,9,
Australia,9,
autograph,9,
back pain,9,
ballerina,9,
barbarian,9,
bartender,9,
beanstalk,9,
bear trap,9,
bed sheet,9,
Beethoven,9,
billiards,9,
bird bath,9,
blindfold,9,
blueberry,9,
bodyguard,9,
Bomberman,9,
bookshelf,9,
boomerang,9,
brainwash,9,
breakfast,9,
broadcast,9,
Bruce Lee,9,
bulldozer,9,
butterfly,9,
Capricorn,9,
cardboard,9,
carnivore,9,
carpenter,9,
Cat Woman,9,
cathedral,9,
celebrate,9,
celebrity,9,
centipede,9,
chameleon,9,
champagne,9,
Chewbacca,9,
chihuahua,9,
Chinatown,9,
chocolate,9,
Christmas,9,
cigarette,9,
classroom,9,
clickbait,9,
clownfish,9,
cockroach,9,
Colosseum,9,
commander,9,
communism,9,
community,9,
condiment,9,
continent,9,
corkscrew,9,
cornfield,9,
crocodile,9,
croissant,9,
dalmatian,9,
dandelion,9,
dashboard,9,
deodorant,9,
depressed,9,
desperate,9,
detective,9,
dispenser,9,
dollhouse,9,
dragonfly,9,
duct tape,9,
Elon Musk,9,
evaporate,9,
evolution,9,
Excalibur,9,
excavator,9,
explosion,9,
eyeshadow,9,
fast food,9,
filmmaker,9,
fingertip,9,
firehouse,9,
fireplace,9,
fireproof,9,
fish bowl,9,
fisherman,9,
frostbite,9,
full moon,9,
furniture,9,
generator,9,
gentleman,9,
geography,9,
gladiator,9,
glowstick,9,
godfather,9,
golf cart,9,
graveyard,9,
hairbrush,9,
hairspray,9,
hamburger,9,
handshake,9,
harmonica,9,
headboard,9,
hibernate,9,
high five,9,
hilarious,9,
Hollywood,9,
honeycomb,9,
hopscotch,9,
horsewhip,9,
hot sauce,9,
hourglass,9,
Hula Hoop,9,
hypnotize,9,
ice cream,9,
incognito,9,
injection,9,
interview,9,
invention,9,
invisible,9,
jellyfish,9,
John Cena,9,
jump rope,9,
junk food,9,
King Kong,9,
Lady Gaga,9,
landscape,9,
Las Vegas,9,
lava lamp,9,
librarian,9,
lightbulb,9,
lightning,9,
limousine,9,
Lion King,9,
magnifier,9,
mannequin,9,
margarine,9,
marmalade,9,
McDonalds,9,
megaphone,9,
meteorite,9,
Microsoft,9,
microwave,9,
milkshake,9,
Milky Way,9,
Minecraft,9,
Mona Lisa,9,
motorbike,9,
mousetrap,9,
nail file,9,
newspaper,9,
nightclub,9,
nightmare,9,
nose hair,9,
nose ring,9,
nosebleed,9,
orangutan,9,
orchestra,9,
paintball,9,
palm tree,9,
paper bag,9,
parachute,9,
peninsula,9,
pensioner,9,
Peppa Pig,9,
pepperoni,9,
periscope,9,
Photoshop,9,
pine cone,9,
pineapple,9,
Pinocchio,9,
pistachio,9,
pitchfork,9,
poisonous,9,
policeman,9,
pollution,9,
porcupine,9,
Porky Pig,9,
president,9,
price tag,9,
professor,9,
promotion,9,
quicksand,9,
radiation,9,
raspberry,9,
reception,9,
rectangle,9,
recycling,9,
roadblock,9,
saltwater,9,
sandstorm,9,
satellite,9,
saxophone,9,
scarecrow,9,
scientist,9,
sculpture,9,
seat belt,9,
shipwreck,9,
signature,9,
Singapore,9,
skydiving,9,
slingshot,9,
snowboard,9,
snowflake,9,
spaceship,9,
spaghetti,9,
Spartacus,9,
spelunker,9,
Spiderman,9,
SpongeBob,9,
sprinkler,9,
Squidward,9,
Star Wars,9,
starfruit,9,
steampunk,9,
Stone Age,9,
stop sign,9,
stopwatch,9,
submarine,9,
sunflower,9,
surfboard,9,
swordfish,9,
tangerine,9,
tarantula,9,
telephone,9,
telescope,9,
Teletubby,9,
tombstone,9,
toothpick,9,
tow truck,9,
Tom Brady,9,
translate,9,
trash can,9,
treadmill,9,
treehouse,9,
Vault boy,9,
vegetable,9,
wallpaper,9,
warehouse,9,
water gun,9,
waterfall,9,
Wolverine,9,
workplace,9,
wrestling,9,
xylophone,9,
yardstick,9,
shoulders,9,
anglerfish,10,
Antarctica,10,
apocalypse,10,
apple seed,10,
aristocrat,10,
basketball,10,
battleship,10,
Bill Gates,10,
binoculars,10,
black hole,10,
blackberry,10,
blacksmith,10,
bricklayer,10,
broomstick,10,
bubble gum,10,
Bugs Bunny,10,
bus driver,10,
cab driver,10,
can opener,10,
calculator,10,
cappuccino,10,
cell phone,10,
chalkboard,10,
chandelier,10,
cheesecake,10,
chest hair,10,
chestplate,10,
chimpanzee,10,
chinchilla,10,
chopsticks,10,
comic book,10,
commercial,10,
controller,10,
cookie jar,10,
coral reef,10,
Daffy Duck,10,
dictionary,10,
diss track,10,
earthquake,10,
face paint,10,
fake teeth,10,
Family Guy,10,
fingernail,10,
fire alarm,10,
fire truck,10,
fist fight,10,
flashlight,10,
floodlight,10,
flying pig,10,
glue stick,10,
gold chain,10,
golden egg,10,
graduation,10,
grapefruit,10,
Great Wall,10,
guillotine,10,
guinea pig,10,
gummy bear,10,
gummy worm,10,
Happy Meal,10,
headphones,10,
helicopter,10,
hieroglyph,10,
high heels,10,
high score,10,
hitchhiker,10,
Home Alone,10,
hovercraft,10,
Iron Giant,10,
jackhammer,10,
James Bond,10,
journalist,10,
Katy Perry,10,
laboratory,10,
lawn mower,10,
leprechaun,10,
lighthouse,10,
lightsaber,10,
litter box,10,
London Eye,10,
lumberjack,10,
Madagascar,10,
magic wand,10,
mayonnaise,10,
microphone,10,
microscope,10,
Mont Blanc,10,
Morse code,10,
motorcycle,10,
nutcracker,10,
overweight,10,
pharmacist,10,
photograph,10,
piggy bank,10,
playground,10,
pogo stick,10,
polar bear,10,
programmer,10,
punishment,10,
rainforest,10,
razorblade,10,
red carpet,10,
reflection,10,
restaurant,10,
rhinoceros,10,
Robin Hood,10,
Scooby Doo,10,
semicircle,10,
silverware,10,
skateboard,10,
South Park,10,
skribbl.io,10,
skyscraper,10,
space suit,10,
Steve Jobs,10,
strawberry,10,
Suez Canal,10,
sunglasses,10,
sports car,10,
superpower,10,
tablecloth,10,
teddy bear,10,
television,10,
Terminator,10,
tissue box,10,
toothbrush,10,
toothpaste,10,
trick shot,10,
Usain Bolt,10,
vegetarian,10,
video game,10,
Vin Diesel,10,
volleyball,10,
windshield,10,
wine glass,10,
wonderland,10,
woodpecker,10,
mont blanc,10,
Angry Birds,11,
barbed wire,11,
bell pepper,11,
bottle flip,11,
butt cheeks,11,
caterpillar,11,
cauliflower,11,
ceiling fan,11,
cheerleader,11,
coast guard,11,
coffee shop,11,
color-blind,11,
comfortable,11,
crawl space,11,
credit card,11,
Donald Duck,11,
electrician,11,
electricity,11,
firecracker,11,
firefighter,11,
fishing rod,11,
floppy disk,11,
fly swatter,11,
forest fire,11,
grandmother,11,
grasshopper,11,
gravedigger,11,
hair roller,11,
Hello Kitty,11,
hummingbird,11,
imagination,11,
Jackie Chan,11,
Kim Jong-un,11,
magic trick,11,
marshmallow,11,
motherboard,11,
Mr Meeseeks,11,
nail polish,11,
Netherlands,11,
New Zealand,11,
North Korea,11,
observatory,11,
pencil case,11,
photo frame,11,
pirate ship,11,
Playstation,11,
pot of gold,11,
sand castle,11,
spray paint,11,
Stegosaurus,11,
supermarket,11,
talent show,11,
taxi driver,11,
temperature,11,
The Beatles,11,
thermometer,11,
Tooth Fairy,11,
tuning fork,11,
underground,11,
underweight,11,
water cycle,11,
wheelbarrow,11,
spray paint,11,
zodiac sign,11,
Barack Obama,12,
Bart Simpson,12,
belly button,12,
Black Friday,12,
broken heart,12,
cheeseburger,12,
Chuck Norris,12,
conversation,12,
cotton candy,12,
Donald Trump,12,
Easter Bunny,12,
Eiffel tower,12,
electric car,12,
fast forward,12,
fire hydrant,12,
flamethrower,12,
Frankenstein,12,
golden apple,12,
Harry Potter,12,
intersection,12,
Isaac Newton,12,
Jesus Christ,12,
Johnny Bravo,12,
kindergarten,12,
Mickey Mouse,12,
Mr. Meeseeks,12,
LeBron James,12,
neighborhood,12,
notification,12,
photographer,12,
pillow fight,12,
Pink Panther,12,
receptionist,12,
relationship,12,
skateboarder,12,
sledgehammer,12,
social media,12,
Solar System,12,
table tennis,12,
thunderstorm,12,
time machine,12,
Tower Bridge,12,
truck driver,12,
Velociraptor,12,
veterinarian,12,
Wonder Woman,12,
Yin and Yang,12,
advertisement,13,
archaeologist,13,
demonstration,13,
Finn and Jake,13,
Green Lantern,13,
Homer Simpson,13,
hot chocolate,13,
Jimmy Neutron,13,
Mount Everest,13,
Venus flytrap,13,
Robbie Rotten,13,
plague doctor,13,
shaving cream,13,
shopping cart,13,
snake charmer,13,
swimming pool,13,
tennis racket,13,
Tower of Pisa,13,
traffic light,13,
Angelina Jolie,14,
bungee jumping,14,
cherry blossom,14,
clothes hanger,14,
Cookie Monster,14,
fidget spinner,14,
ice cream shop,14,
Jack-o-lantern,14,
Morgan Freeman,14,
Mount Rushmore,14,
sewing machine,14,
snowball fight,14,
Susan Wojcicki,14,
Abraham Lincoln,15,
air conditioner,15,
Captain America,15,
Charlie Chaplin,15,
Crash Bandicoot,15,
electric guitar,15,
fitness trainer,15,
Fred Flintstone,15,
ice cream truck,15,
Mark Zuckerberg,15,
Michael Jackson,15,
Nintendo Switch,15,
Northern Lights,15,
procrastination,15,
Sherlock Holmes,15,
virtual reality,15,
William Wallace,15,
Winnie the Pooh,15,
Darwin Watterson,16,
fashion designer,16,
flight attendant,16,
pencil sharpener,16,
Phineas and Ferb,16,
Leonardo da Vinci,17,
Leonardo DiCaprio,17,
Statue of Liberty,17,
Sydney Opera House,18,
Leonardo Di Caprio,18,
Great Barrier Reef,
Sydney Opera House,18,
William Shakespeare,19`;
let parsedWordDatabase = null;
let hintObserver = null;
let isAutoGuessing = false;
let currentAutoguessDelay = defaultAutoguessDelay;
let autoGuessTimeoutId = null;
let currentWordListForAutoguess = [];
let guessedWordsThisRound = new Set();
let lastHintInfoSignature = null;
let canvasRect = null;
const canvas = document.querySelector("#game-canvas canvas");
if (!canvas) { alert("Could not find the game canvas element."); return; }
const guiContainerId = 'skribblDrawGuiContainerV3';
const openButtonId = 'skribblDrawGuiOpenButtonV3';
const panelId = 'skribblDrawGuiPanelV3';
const drawButtonId = 'skribblDrawGuiDrawButtonV3';
const dbButtonId = 'skribblDrawGuiDbButtonV3';
const closeGuiButtonId = 'skribblDrawGuiCloseButtonV3';
const inputClass = 'skribblDrawGuiInputV3';
const dbResultsId = 'skribblDrawDbResultsV3';
const autoguessButtonId = 'skribblDrawAutoguessButtonV3';
const autoguessSliderId = 'skribblDrawAutoguessSliderV3';
const autoguessDelayValueId = 'skribblDrawAutoguessDelayValueV3';
const styleId = 'skribblModernStyleV3';
function sleep(ms) { return new Promise(resolve => { autoGuessTimeoutId = setTimeout(resolve, ms); }); }
function simulatePointerEvent(element, eventName, clientX, clientY) {
if(!canvasRect){console.error("Canvas position (rect) not available for event simulation.");return}
const eventOptions={
bubbles: true,
cancelable: true,
clientX: Math.round(clientX),
clientY: Math.round(clientY),
pointerId: 1,
pointerType: "mouse",
isPrimary: true,
view: document.defaultView
};
let event;
try{
event=new PointerEvent(eventName,eventOptions);
} catch(e){
delete eventOptions.pointerId;
delete eventOptions.pointerType;
delete eventOptions.isPrimary;
event=new MouseEvent(eventName,eventOptions);
}
element.dispatchEvent(event);
}
function parseWordDatabase(csvString) {
if(parsedWordDatabase)return parsedWordDatabase;
if(!csvString||csvString==='PASTE_WORD_DATABASE_HERE'||csvString.trim()==='')return[];
parsedWordDatabase=[];const lines=csvString.split(/\r?\n/);let parseCount=0;
lines.forEach((line,index)=>{
const trimmedLine=line.trim();if(!trimmedLine||trimmedLine.toLowerCase()==='word,count'||trimmedLine.toLowerCase()==='word,count,')return;
const parts=trimmedLine.split(',');
if(parts.length>=2){
const word=parts[0].trim().toLowerCase();const count=parseInt(parts[1].trim(),10);
if(word&&!isNaN(count)&&count>0){parsedWordDatabase.push({word:word,count:count});parseCount++}
}
});
return parsedWordDatabase;
}
function getHintInfo() {
const hintContainer=document.querySelector("#game-word .container");if(!hintContainer)return null;
const hintElements=hintContainer.querySelectorAll('.hint');if(!hintElements||hintElements.length===0)return null;
const hints=[];let hasContent=!1;let currentSignature='';
hintElements.forEach(el=>{
const textContent=el.textContent;const hasUncover=el.classList.contains('uncover');let char='_';
if(hasUncover){if(textContent==='-'){char='-'}else if(textContent===' '||textContent.trim()===''){char=' '}else{char=textContent.trim().toLowerCase()}hasContent=!0}
else{hasContent=!0}hints.push(char);currentSignature+=char
});
const wordLengthEl=hintContainer.querySelector('.word-length');if(!wordLengthEl||!hasContent)return null;
const expectedLengthText=wordLengthEl.textContent.trim();const lengths=expectedLengthText.split(' ').map(n=>parseInt(n,10)).filter(n=>!isNaN(n));if(lengths.length===0)return null;
const spaceCount=Math.max(0,lengths.length-1);const totalLength=hints.length;
if(lengths.reduce((s,l)=>s+l,0)+spaceCount!==totalLength){}
let isNewRound=!1;
if(currentSignature!==lastHintInfoSignature){
const wentToBlanks=lastHintInfoSignature&&lastHintInfoSignature.replace(/_/g,'').length>0&¤tSignature.replace(/_/g,'').length===0;
const lengthChanged=lastHintInfoSignature&¤tSignature.length!==lastHintInfoSignature.length;
if(wentToBlanks||lengthChanged||lastHintInfoSignature===null){guessedWordsThisRound.clear();isNewRound=!0}
lastHintInfoSignature=currentSignature
}
return{hints:hints,length:totalLength,spaceCount:spaceCount,isNewRound:isNewRound}
}
function filterWords(hintInfo, wordDatabase) {
if(!hintInfo)return{filteredWords:[],message:"No active word/hints found."};
if(!wordDatabase||wordDatabase.length===0)return{filteredWords:[],message:"Word database is empty or not loaded."};
const{hints,length:wordLength,spaceCount}=hintInfo;
let possibleWords=wordDatabase.filter(entry=>{const entrySpaceCount=(entry.word.match(/ /g)||[]).length;return entry.word.length===wordLength&&entrySpaceCount===spaceCount});
if(possibleWords.length===0)return{filteredWords:[],message:`No words found with length ${wordLength} and exactly ${spaceCount} spaces.`};
hints.forEach((hintChar,index)=>{if(hintChar!=='_'){const initialCount=possibleWords.length;possibleWords=possibleWords.filter(entry=>entry.word.length===wordLength&&entry.word[index]===hintChar)}});
const initialCountBeforeGuessFilter=possibleWords.length;possibleWords=possibleWords.filter(entry=>!guessedWordsThisRound.has(entry.word));
const wordStrings=possibleWords.map(entry=>entry.word);
if(wordStrings.length===0){if(initialCountBeforeGuessFilter>0){return{filteredWords:[],message:"All matching words already guessed."}}else{return{filteredWords:[],message:"No matching words found."}}}
return{filteredWords:wordStrings,message:`${wordStrings.length} possible words:`}
}
function submitGuess(word) {
const chatInput=document.querySelector(".chat-form input[type='text']");const chatForm=document.querySelector(".chat-form");
if(chatInput&&chatForm&&word){chatInput.value=word;chatInput.dispatchEvent(new Event('input',{bubbles:!0}));chatForm.requestSubmit();}
}
function updateWordDbDisplay() {
const dbResultsDiv=document.getElementById(dbResultsId);if(!dbResultsDiv)return;
const hintInfo=getHintInfo();const db=parseWordDatabase(WORD_DATABASE_CSV_STRING);
const{filteredWords,message}=filterWords(hintInfo,db);currentWordListForAutoguess=filteredWords;
dbResultsDiv.innerHTML='';const messageP=document.createElement('p');messageP.textContent=message;
dbResultsDiv.appendChild(messageP);
if(filteredWords.length>0){
const list=document.createElement('ul');
filteredWords.forEach(word=>{
const item=document.createElement('li');const button=document.createElement('button');button.textContent=word;button.setAttribute('data-word',word);
button.className = 'skribbl-db-word-button';
if(guessedWordsThisRound.has(word)){button.classList.add('guessed');button.disabled=!0}
button.addEventListener('click',(e)=>{e.preventDefault();submitGuess(word);guessedWordsThisRound.add(word);button.classList.add('guessed');button.disabled=!0});
item.appendChild(button);list.appendChild(item)
});
dbResultsDiv.appendChild(list)
}
}
async function drawSegment(startCanvasX, startCanvasY, endCanvasX, endCanvasY, isFirstSegment, isLastSegment) {
if(!canvasRect){return}
const startClientX=canvasRect.left+startCanvasX;const startClientY=canvasRect.top+startCanvasY;const endClientX=canvasRect.left+endCanvasX;const endClientY=canvasRect.top+endCanvasY;
const clampedStartX=Math.max(canvasRect.left,Math.min(canvasRect.right,startClientX));const clampedStartY=Math.max(canvasRect.top,Math.min(canvasRect.bottom,startClientY));
const clampedEndX=Math.max(canvasRect.left,Math.min(canvasRect.right,endClientX));const clampedEndY=Math.max(canvasRect.top,Math.min(canvasRect.bottom,endClientY));
if(isFirstSegment){simulatePointerEvent(canvas,'pointerdown',clampedStartX,clampedStartY);await sleep(15)}
simulatePointerEvent(canvas,'pointermove',clampedEndX,clampedEndY);await sleep(lineDelay);
if(isLastSegment){simulatePointerEvent(canvas,'pointerup',clampedEndX,clampedEndY);await sleep(25)}
}
async function drawCharacter(char, charStartX, charStartY, charWidth, charHeight) {
const points = getCharacterPoints(char, charStartX, charStartY, charWidth, charHeight);
if (!points || points.length < 1) return;
let lastPoint = null; let isFirstSegmentOfStroke = true;
for (let i = 0; i < points.length; i++) {
const currentPoint = points[i];
if (currentPoint === null) { lastPoint = null; isFirstSegmentOfStroke = true; }
else if (lastPoint !== null) {
const isLastSegmentOfChar = (i === points.length - 1 || points[i+1] === null);
await drawSegment(lastPoint[0], lastPoint[1], currentPoint[0], currentPoint[1], isFirstSegmentOfStroke, isLastSegmentOfChar);
lastPoint = currentPoint; isFirstSegmentOfStroke = false;
} else {
lastPoint = currentPoint; isFirstSegmentOfStroke = true;
if (i === points.length - 1 || points[i+1] === null) {
await drawSegment(lastPoint[0], lastPoint[1], lastPoint[0], lastPoint[1], true, true);
lastPoint = null; isFirstSegmentOfStroke = true;
}
}
}
if (lastPoint !== null && !isFirstSegmentOfStroke) {
const lastClientX = canvasRect.left + lastPoint[0]; const lastClientY = canvasRect.top + lastPoint[1];
const clampedX = Math.max(canvasRect.left, Math.min(canvasRect.right, lastClientX)); const clampedY = Math.max(canvasRect.top, Math.min(canvasRect.bottom, lastClientY));
simulatePointerEvent(canvas, 'pointerup', clampedX, clampedY); await sleep(25);
}
}
async function drawTextLines(lines) {
if (!lines || lines.length === 0) return;
canvasRect = canvas.getBoundingClientRect();
const currentCanvasWidth = canvas.width; const currentCanvasHeight = canvas.height;
const safeWidth = currentCanvasWidth * safetyMarginFactor; const safeHeight = currentCanvasHeight * safetyMarginFactor;
let fontSize, charWidth, charHeight, lineHeight; let longestLineLength = 0;
lines.forEach(line => { if (line.length > longestLineLength) { longestLineLength = line.length; } });
const maxFontSizeWidth = longestLineLength > 0 ? (safeWidth / (longestLineLength * charWidthRatio)) : safeHeight;
if (lines.length === 1) {
const line = lines[0];
fontSize = Math.max(5, Math.min(maxFontSizeWidth, safeHeight / charHeightRatio));
charWidth = fontSize * charWidthRatio; charHeight = fontSize * charHeightRatio;
const lineWidth = line.split('').reduce((width, char) => { return width + (char === ' ' ? charWidth * spaceWidthFactor : charWidth * charSpacingFactor); }, 0);
const startX = (currentCanvasWidth - lineWidth) / 2; const startY = (currentCanvasHeight - charHeight) / 2;
let currentX = startX;
for (const char of line.split('')) {
if (char === ' ') { currentX += charWidth * spaceWidthFactor; }
else { if (currentX >= 0 && currentX + charWidth <= currentCanvasWidth && startY >= 0 && startY + charHeight <= currentCanvasHeight) { await drawCharacter(char, currentX, startY, charWidth, charHeight); } else { console.warn(`Character '${char}' skipped (out of bounds).`); } currentX += charWidth * charSpacingFactor; }
if (currentX > currentCanvasWidth) break;
}
} else {
const requiredBlockHeightFactor = lines.length * charHeightRatio * lineSpacingFactor; const maxFontSizeHeight = safeHeight / requiredBlockHeightFactor;
fontSize = Math.max(5, Math.min(maxFontSizeWidth, maxFontSizeHeight));
charWidth = fontSize * charWidthRatio; charHeight = fontSize * charHeightRatio; lineHeight = charHeight * lineSpacingFactor;
const totalBlockHeight = lines.length * lineHeight - (lineHeight - charHeight);
let currentY = (currentCanvasHeight - totalBlockHeight) / 2; currentY = Math.max(0, currentY);
for (const line of lines) {
const lineWidth = line.split('').reduce((width, char) => { return width + (char === ' ' ? charWidth * spaceWidthFactor : charWidth * charSpacingFactor); }, 0);
let currentX = (currentCanvasWidth - lineWidth) / 2;
for (const char of line.split('')) {
if (char === ' ') { currentX += charWidth * spaceWidthFactor; }
else { if (currentX >= 0 && currentX + charWidth <= currentCanvasWidth && currentY >= 0 && currentY + charHeight <= currentCanvasHeight) { await drawCharacter(char, currentX, currentY, charWidth, charHeight); } else { console.warn(`Character '${char}' skipped (out of bounds).`); } currentX += charWidth * charSpacingFactor; }
if (currentX > currentCanvasWidth) break;
}
currentY += lineHeight; if (currentY > currentCanvasHeight) { console.warn("Next line would start below canvas. Stopping."); break; }
}
}
}
function getCharacterPoints(char, startX, startY, charWidth, charHeight) {
const points=[]; const H=charHeight, W=charWidth, X=startX, Y=startY;
switch(char){
case 'A': points.push([X, Y + H]); points.push([X + W / 2, Y]); points.push([X + W, Y + H]); points.push(null); points.push([X + W * 0.2, Y + H * 0.6]); points.push([X + W * 0.8, Y + H * 0.6]); break;
case 'B': points.push([X, Y]); points.push([X, Y + H]); points.push(null); points.push([X, Y]); points.push([X + W * 0.8, Y]); points.push([X + W, Y + H * 0.25]); points.push([X + W * 0.8, Y + H * 0.5]); points.push([X, Y + H * 0.5]); points.push(null); points.push([X, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.5]); points.push([X + W, Y + H * 0.75]); points.push([X + W * 0.8, Y + H]); points.push([X, Y + H]); break;
case 'C': points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.9, Y + H * 0.8]); break;
case 'D': points.push([X, Y]); points.push([X, Y + H]); points.push(null); points.push([X, Y]); points.push([X + W * 0.8, Y]); points.push([X + W, Y + H * 0.3]); points.push([X + W, Y + H * 0.7]); points.push([X + W * 0.8, Y + H]); points.push([X, Y + H]); break;
case 'E': points.push([X + W, Y]); points.push([X, Y]); points.push([X, Y + H]); points.push([X + W, Y + H]); points.push(null); points.push([X, Y + H / 2]); points.push([X + W * 0.75, Y + H / 2]); break;
case 'F': points.push([X + W, Y]); points.push([X, Y]); points.push([X, Y + H]); points.push(null); points.push([X, Y + H / 2]); points.push([X + W * 0.75, Y + H / 2]); break;
case 'G': points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W, Y + H * 0.5]); points.push([X + W * 0.5, Y + H * 0.5]); break;
case 'H': points.push([X, Y]); points.push([X, Y + H]); points.push(null); points.push([X + W, Y]); points.push([X + W, Y + H]); points.push(null); points.push([X, Y + H / 2]); points.push([X + W, Y + H / 2]); break;
case 'I': points.push([X + W / 2, Y]); points.push([X + W / 2, Y + H]); points.push(null); points.push([X + W * 0.2, Y]); points.push([X + W * 0.8, Y]); points.push(null); points.push([X + W * 0.2, Y + H]); points.push([X + W * 0.8, Y + H]); break;
case 'J': points.push([X + W * 0.8, Y]); points.push([X + W * 0.8, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.2, Y + H * 0.8]); break;
case 'K': points.push([X, Y]); points.push([X, Y + H]); points.push(null); points.push([X + W, Y]); points.push([X + W * 0.2, Y + H / 2]); points.push([X + W, Y + H]); break;
case 'L': points.push([X, Y]); points.push([X, Y + H]); points.push([X + W, Y + H]); break;
case 'M': points.push([X, Y + H]); points.push([X, Y]); points.push([X + W / 2, Y + H * 0.6]); points.push([X + W, Y]); points.push([X + W, Y + H]); break;
case 'N': points.push([X, Y + H]); points.push([X, Y]); points.push([X + W, Y + H]); points.push([X + W, Y]); break;
case 'O': points.push([X + W * 0.5, Y]); points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.5, Y]); break;
case 'P': points.push([X, Y + H]); points.push([X, Y]); points.push(null); points.push([X, Y]); points.push([X + W * 0.8, Y]); points.push([X + W, Y + H * 0.25]); points.push([X + W * 0.8, Y + H * 0.5]); points.push([X, Y + H * 0.5]); break;
case 'Q': points.push([X + W * 0.5, Y]); points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.5, Y]); points.push(null); points.push([X + W * 0.6, Y + H * 0.7]); points.push([X + W, Y + H]); break;
case 'R': points.push([X, Y + H]); points.push([X, Y]); points.push(null); points.push([X, Y]); points.push([X + W * 0.8, Y]); points.push([X + W, Y + H * 0.25]); points.push([X + W * 0.8, Y + H * 0.5]); points.push([X, Y + H * 0.5]); points.push(null); points.push([X + W * 0.4, Y + H * 0.5]); points.push([X + W, Y + H]); break;
case 'S': points.push([X + W * 0.9, Y + H * 0.1]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.1, Y + H * 0.1]); points.push([X, Y + H * 0.3]); points.push([X + W * 0.9, Y + H * 0.7]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.9]); break;
case 'T': points.push([X, Y]); points.push([X + W, Y]); points.push(null); points.push([X + W / 2, Y]); points.push([X + W / 2, Y + H]); break;
case 'U': points.push([X, Y]); points.push([X, Y + H * 0.8]); points.push([X + W * 0.2, Y + H]); points.push([X + W * 0.8, Y + H]); points.push([X + W, Y + H * 0.8]); points.push([X + W, Y]); break;
case 'V': points.push([X, Y]); points.push([X + W / 2, Y + H]); points.push([X + W, Y]); break;
case 'W': points.push([X, Y]); points.push([X + W * 0.25, Y + H]); points.push([X + W / 2, Y + H / 3]); points.push([X + W * 0.75, Y + H]); points.push([X + W, Y]); break;
case 'X': points.push([X, Y]); points.push([X + W, Y + H]); points.push(null); points.push([X + W, Y]); points.push([X, Y + H]); break;
case 'Y': points.push([X, Y]); points.push([X + W / 2, Y + H / 2]); points.push([X + W, Y]); points.push(null); points.push([X + W / 2, Y + H / 2]); points.push([X + W / 2, Y + H]); break;
case 'Z': points.push([X, Y]); points.push([X + W, Y]); points.push([X, Y + H]); points.push([X + W, Y + H]); break;
case '0': points.push([X + W * 0.5, Y]); points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.5, Y]); break;
case '1': points.push([X + W * 0.3, Y + H * 0.15]); points.push([X + W / 2, Y]); points.push([X + W / 2, Y + H]); points.push(null); points.push([X + W * 0.2, Y + H]); points.push([X + W * 0.8, Y + H]); break;
case '2': points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W * 0.8, Y + H * 0.4]); points.push([X, Y + H]); points.push([X + W, Y + H]); break;
case '3': points.push([X + W * 0.1, Y + H * 0.1]); points.push([X + W * 0.8, Y]); points.push([X + W, Y + H * 0.3]); points.push([X + W * 0.6, Y + H * 0.5]); points.push([X + W, Y + H * 0.7]); points.push([X + W * 0.8, Y + H]); points.push([X + W * 0.1, Y + H * 0.9]); break;
case '4': points.push([X + W * 0.2, Y]); points.push([X + W * 0.2, Y + H * 0.6]); points.push([X + W, Y + H * 0.6]); points.push(null); points.push([X + W * 0.7, Y]); points.push([X + W * 0.7, Y + H]); break;
case '5': points.push([X + W, Y]); points.push([X, Y]); points.push([X, Y + H * 0.5]); points.push(null); points.push([X, Y + H * 0.5]); points.push([X + W * 0.8, Y + H * 0.5]); points.push([X + W, Y + H * 0.7]); points.push([X + W * 0.8, Y + H]); points.push([X + W * 0.1, Y + H * 0.9]); break;
case '6': points.push([X + W * 0.8, Y + H * 0.1]); points.push([X + W * 0.2, Y + H * 0.3]); points.push([X, Y + H * 0.6]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W * 0.8, Y + H * 0.5]); points.push([X, Y + H * 0.6]); break;
case '7': points.push([X, Y]); points.push([X + W, Y]); points.push([X + W * 0.3, Y + H]); break;
case '8': points.push([X + W * 0.5, Y]); points.push([X + W * 0.9, Y + H * 0.2]); points.push([X + W * 0.5, Y + H * 0.5]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.5, Y]); points.push(null); points.push([X + W * 0.5, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.8]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.8]); points.push([X + W * 0.5, Y + H * 0.5]); break;
case '9': points.push([X + W * 0.2, Y + H * 0.9]); points.push([X + W * 0.8, Y + H * 0.7]); points.push([X + W, Y + H * 0.4]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.1, Y + H * 0.2]); points.push([X + W * 0.2, Y + H * 0.5]); points.push([X + W, Y + H * 0.4]); break;
case 'a': points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.1, Y + H*0.65]); points.push([X + W*0.25, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.5]); points.push(null); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.75, Y + H]); break;
case 'b': points.push([X + W*0.25, Y]); points.push([X + W*0.25, Y + H]); points.push(null); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.9, Y + H*0.65]); points.push([X + W*0.75, Y + H*0.8]); points.push([X + W*0.25, Y + H*0.8]); break;
case 'c': points.push([X + W*0.9, Y + H*0.55]); points.push([X + W*0.5, Y + H*0.4]); points.push([X + W*0.1, Y + H*0.55]); points.push([X, Y + H*0.75]); points.push([X + W*0.1, Y + H*0.95]); points.push([X + W*0.5, Y + H]); points.push([X + W*0.9, Y + H*0.95]); break;
case 'd': points.push([X + W*0.75, Y]); points.push([X + W*0.75, Y + H]); points.push(null); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.1, Y + H*0.65]); points.push([X + W*0.25, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.8]); break;
case 'e': points.push([X + W*0.1, Y + H*0.6]); points.push([X + W*0.9, Y + H*0.6]); points.push(null); points.push([X + W*0.9, Y + H*0.6]); points.push([X + W*0.6, Y + H*0.4]); points.push([X + W*0.2, Y + H*0.5]); points.push([X, Y + H*0.75]); points.push([X + W*0.2, Y + H]); points.push([X + W*0.8, Y + H*0.9]); break;
case 'f': points.push([X + W*0.7, Y]); points.push([X + W*0.3, Y + H*0.1]); points.push([X + W*0.3, Y + H]); points.push(null); points.push([X, Y + H*0.5]); points.push([X + W*0.7, Y + H*0.5]); break;
case 'g': points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.1, Y + H*0.65]); points.push([X + W*0.25, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.5]); points.push(null); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.75, Y + H*1.2]); points.push([X + W*0.5, Y + H*1.3]); points.push([X + W*0.1, Y + H*1.1]); points.push([X + W*0.3, Y + H*0.9]); break;
case 'h': points.push([X + W*0.25, Y]); points.push([X + W*0.25, Y + H]); points.push(null); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.5, Y + H*0.5]); points.push([X + W*0.75, Y + H*0.6]); points.push([X + W*0.75, Y + H]); break;
case 'i': points.push([X + W/2, Y + H*0.4]); points.push([X + W/2, Y + H]); points.push(null); points.push([X + W/2, Y + H*0.2]); points.push([X + W/2, Y + H*0.25]); break;
case 'j': points.push([X + W*0.6, Y + H*0.4]); points.push([X + W*0.6, Y + H*1.2]); points.push([X + W*0.4, Y + H*1.3]); points.push([X + W*0.1, Y + H*1.1]); points.push(null); points.push([X + W*0.6, Y + H*0.2]); points.push([X + W*0.6, Y + H*0.25]); break;
case 'k': points.push([X + W*0.25, Y]); points.push([X + W*0.25, Y + H]); points.push(null); points.push([X + W*0.8, Y + H*0.5]); points.push([X + W*0.25, Y + H*0.7]); points.push([X + W*0.8, Y + H]); break;
case 'l': points.push([X + W/2, Y]); points.push([X + W/2, Y + H]); break;
case 'm': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W*0.1, Y + H]); points.push(null); points.push([X + W*0.1, Y + H*0.5]); points.push([X + W*0.3, Y + H*0.5]); points.push([X + W*0.5, Y + H*0.6]); points.push([X + W*0.5, Y + H]); points.push(null); points.push([X + W*0.5, Y + H*0.5]); points.push([X + W*0.7, Y + H*0.5]); points.push([X + W*0.9, Y + H*0.6]); points.push([X + W*0.9, Y + H]); break;
case 'n': points.push([X + W*0.2, Y + H*0.5]); points.push([X + W*0.2, Y + H]); points.push(null); points.push([X + W*0.2, Y + H*0.5]); points.push([X + W*0.5, Y + H*0.5]); points.push([X + W*0.8, Y + H*0.6]); points.push([X + W*0.8, Y + H]); break;
case 'o': points.push([X + W * 0.5, Y + H*0.4]); points.push([X + W * 0.9, Y + H * 0.55]); points.push([X + W, Y + H * 0.75]); points.push([X + W * 0.9, Y + H * 0.95]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.95]); points.push([X, Y + H * 0.75]); points.push([X + W * 0.1, Y + H * 0.55]); points.push([X + W * 0.5, Y + H*0.4]); break;
case 'p': points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.9, Y + H*0.65]); points.push([X + W*0.75, Y + H*0.8]); points.push([X + W*0.25, Y + H*0.8]); points.push(null); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.25, Y + H*1.3]); break;
case 'q': points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.1, Y + H*0.65]); points.push([X + W*0.25, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.8]); points.push(null); points.push([X + W*0.75, Y + H*0.5]); points.push([X + W*0.75, Y + H*1.3]); points.push([X + W*0.9, Y + H*1.2]); break;
case 'r': points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.25, Y + H]); points.push(null); points.push([X + W*0.25, Y + H*0.5]); points.push([X + W*0.6, Y + H*0.5]); points.push([X + W*0.8, Y + H*0.6]); break;
case 's': points.push([X + W * 0.9, Y + H * 0.5]); points.push([X + W * 0.5, Y + H*0.4]); points.push([X + W * 0.1, Y + H * 0.5]); points.push([X, Y + H * 0.65]); points.push([X + W * 0.9, Y + H * 0.85]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.9]); break;
case 't': points.push([X + W/2, Y + H*0.1]); points.push([X + W/2, Y + H]); points.push(null); points.push([X + W*0.1, Y + H*0.4]); points.push([X + W*0.9, Y + H*0.4]); break;
case 'u': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W*0.1, Y + H*0.9]); points.push([X + W*0.3, Y + H]); points.push([X + W*0.7, Y + H]); points.push([X + W*0.9, Y + H*0.9]); points.push([X + W*0.9, Y + H*0.5]); break;
case 'v': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W / 2, Y + H]); points.push([X + W*0.9, Y + H*0.5]); break;
case 'w': points.push([X, Y + H*0.5]); points.push([X + W * 0.25, Y + H]); points.push([X + W / 2, Y + H * 0.7]); points.push([X + W * 0.75, Y + H]); points.push([X + W, Y + H*0.5]); break;
case 'x': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W*0.9, Y + H]); points.push(null); points.push([X + W*0.9, Y + H*0.5]); points.push([X + W*0.1, Y + H]); break;
case 'y': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W / 2, Y + H]); points.push([X + W*0.9, Y + H*0.5]); points.push(null); points.push([X + W / 2, Y + H]); points.push([X + W*0.3, Y + H*1.3]); break;
case 'z': points.push([X + W*0.1, Y + H*0.5]); points.push([X + W*0.9, Y + H*0.5]); points.push([X + W*0.1, Y + H]); points.push([X + W*0.9, Y + H]); break;
case '!': points.push([X + W/2, Y]); points.push([X + W/2, Y + H*0.7]); points.push(null); points.push([X + W/2, Y + H*0.9]); points.push([X + W/2, Y + H]); break;
case '@': points.push([X + W*0.75, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.3]); points.push([X + W*0.5, Y + H*0.2]); points.push([X + W*0.25, Y + H*0.3]); points.push([X + W*0.25, Y + H*0.8]); points.push([X + W*0.75, Y + H*0.8]); points.push(null); points.push([X + W*0.5, Y]); points.push([X + W, Y + H*0.5]); points.push([X + W*0.5, Y + H]); points.push([X, Y + H*0.5]); points.push([X + W*0.5, Y]); break;
case '#': points.push([X + W*0.25, Y + H*0.2]); points.push([X + W*0.25, Y + H*0.8]); points.push(null); points.push([X + W*0.75, Y + H*0.2]); points.push([X + W*0.75, Y + H*0.8]); points.push(null); points.push([X, Y + H*0.4]); points.push([X + W, Y + H*0.4]); points.push(null); points.push([X, Y + H*0.6]); points.push([X + W, Y + H*0.6]); break;
case '$': points.push([X + W * 0.9, Y + H * 0.1]); points.push([X + W * 0.5, Y]); points.push([X + W * 0.1, Y + H * 0.1]); points.push([X, Y + H * 0.3]); points.push([X + W * 0.9, Y + H * 0.7]); points.push([X + W * 0.5, Y + H]); points.push([X + W * 0.1, Y + H * 0.9]); points.push(null); points.push([X + W/2, Y]); points.push([X + W/2, Y + H]); break;
case '%': points.push([X + W*0.2, Y + H*0.1]); points.push([X + W*0.4, Y + H*0.3]); points.push([X + W*0.2, Y + H*0.5]); points.push([X, Y + H*0.3]); points.push([X + W*0.2, Y + H*0.1]); points.push(null); points.push([X, Y + H]); points.push([X + W, Y]); points.push(null); points.push([X + W*0.8, Y + H*0.9]); points.push([X + W*0.6, Y + H*0.7]); points.push([X + W*0.8, Y + H*0.5]); points.push([X + W, Y + H*0.7]); points.push([X + W*0.8, Y + H*0.9]); break;
case '^': points.push([X + W*0.1, Y + H*0.6]); points.push([X + W/2, Y + H*0.2]); points.push([X + W*0.9, Y + H*0.6]); break;
case '&': points.push([X + W, Y + H*0.8]); points.push([X + W*0.5, Y + H]); points.push([X + W*0.2, Y + H*0.8]); points.push([X, Y + H*0.5]); points.push([X + W*0.5, Y]); points.push([X + W*0.8, Y + H*0.2]); points.push([X + W*0.5, Y + H*0.5]); points.push([X, Y + H*0.8]); break;
case '*': points.push([X + W/2, Y]); points.push([X + W/2, Y + H]); points.push(null); points.push([X, Y + H/2]); points.push([X + W, Y + H/2]); points.push(null); points.push([X + W*0.1, Y + H*0.1]); points.push([X + W*0.9, Y + H*0.9]); points.push(null); points.push([X + W*0.9, Y + H*0.1]); points.push([X + W*0.1, Y + H*0.9]); break;
case '(': points.push([X + W*0.8, Y]); points.push([X + W*0.3, Y + H*0.2]); points.push([X + W*0.3, Y + H*0.8]); points.push([X + W*0.8, Y + H]); break;
case ')': points.push([X + W*0.2, Y]); points.push([X + W*0.7, Y + H*0.2]); points.push([X + W*0.7, Y + H*0.8]); points.push([X + W*0.2, Y + H]); break;
case '_': points.push([X, Y + H]); points.push([X + W, Y + H]); break;
case '+': points.push([X + W/2, Y + H*0.2]); points.push([X + W/2, Y + H*0.8]); points.push(null); points.push([X + W*0.1, Y + H/2]); points.push([X + W*0.9, Y + H/2]); break;
case '[': points.push([X + W*0.7, Y]); points.push([X + W*0.3, Y]); points.push([X + W*0.3, Y + H]); points.push([X + W*0.7, Y + H]); break;
case ']': points.push([X + W*0.3, Y]); points.push([X + W*0.7, Y]); points.push([X + W*0.7, Y + H]); points.push([X + W*0.3, Y + H]); break;
case '{': points.push([X + W*0.8, Y]); points.push([X + W*0.4, Y + H*0.1]); points.push([X + W*0.4, Y + H*0.4]); points.push([X + W*0.2, Y + H*0.5]); points.push([X + W*0.4, Y + H*0.6]); points.push([X + W*0.4, Y + H*0.9]); points.push([X + W*0.8, Y + H]); break;
case '}': points.push([X + W*0.2, Y]); points.push([X + W*0.6, Y + H*0.1]); points.push([X + W*0.6, Y + H*0.4]); points.push([X + W*0.8, Y + H*0.5]); points.push([X + W*0.6, Y + H*0.6]); points.push([X + W*0.6, Y + H*0.9]); points.push([X + W*0.2, Y + H]); break;
case '|': points.push([X + W/2, Y]); points.push([X + W/2, Y + H]); break;
case '\\': points.push([X, Y]); points.push([X + W, Y + H]); break;
case ';': points.push([X + W/2, Y + H*0.4]); points.push([X + W/2, Y + H*0.7]); points.push(null); points.push([X + W/2, Y + H*0.9]); points.push([X + W*0.4, Y + H]); break;
case ':': points.push([X + W/2, Y + H*0.3]); points.push([X + W/2, Y + H*0.4]); points.push(null); points.push([X + W/2, Y + H*0.6]); points.push([X + W/2, Y + H*0.7]); break;
case '"': points.push([X + W*0.3, Y]); points.push([X + W*0.3, Y + H*0.3]); points.push(null); points.push([X + W*0.7, Y]); points.push([X + W*0.7, Y + H*0.3]); break;
case '\'': points.push([X + W/2, Y]); points.push([X + W/2, Y + H*0.3]); break;
case ',': points.push([X + W/2, Y + H*0.7]); points.push([X + W*0.4, Y + H]); break;
case '.': points.push([X + W/2, Y + H*0.9]); points.push([X + W/2, Y + H]); break;
case '/': points.push([X + W, Y]); points.push([X, Y + H]); break;
case '<': points.push([X + W*0.8, Y]); points.push([X + W*0.2, Y + H/2]); points.push([X + W*0.8, Y + H]); break;
case '>': points.push([X + W*0.2, Y]); points.push([X + W*0.8, Y + H/2]); points.push([X + W*0.2, Y + H]); break;
case '?': points.push([X + W*0.1, Y + H*0.3]); points.push([X + W*0.5, Y]); points.push([X + W*0.9, Y + H*0.3]); points.push([X + W*0.7, Y + H*0.5]); points.push([X + W*0.5, Y + H*0.5]); points.push([X + W*0.5, Y + H*0.7]); points.push(null); points.push([X + W*0.5, Y + H*0.9]); points.push([X + W*0.5, Y + H]); break;
case '-': points.push([X + W * 0.1, Y + H * 0.5]); points.push([X + W * 0.9, Y + H * 0.5]); break;
case ' ': return [];
default: console.warn(`Character '${char}' not implemented for drawing.`); return null;
}
return points;
}
async function startAutoGuessing(words, delay) {
console.log(`Starting autoguess with ${words.length} words, delay ${delay}ms`);const chatInput=document.querySelector(".chat-form input[type='text']");const chatForm=document.querySelector(".chat-form");const autoguessBtn=document.getElementById(autoguessButtonId);if(!chatInput||!chatForm){console.error("Autoguess failed: Could not find chat input or form.");isAutoGuessing=!1;if(autoguessBtn){autoguessBtn.textContent='Autoguess';autoguessBtn.style.backgroundColor='var(--skribbl-red)'}return}if(autoGuessTimeoutId)clearTimeout(autoGuessTimeoutId);currentWordListForAutoguess=[...words];for(let i=0;i<currentWordListForAutoguess.length;i++){const word=currentWordListForAutoguess[i];if(!word)continue;if(!isAutoGuessing){console.log("Autoguess stopped by user.");if(autoguessBtn){autoguessBtn.textContent='Autoguess';autoguessBtn.style.backgroundColor='var(--skribbl-red)'}return}if(guessedWordsThisRound.has(word)){console.log(`Autoguess skipping already guessed: ${word}`);continue}const hintInfo=getHintInfo();if(!hintInfo||hintInfo.length!==word.length){console.log("Hints changed/disappeared, stopping autoguess.");isAutoGuessing=!1;if(autoguessBtn){autoguessBtn.textContent='Autoguess';autoguessBtn.style.backgroundColor='var(--skribbl-red)'}return}chatInput.value=word;chatInput.dispatchEvent(new Event('input',{bubbles:!0}));await sleep(15);if(!isAutoGuessing){if(autoguessBtn){autoguessBtn.textContent='Autoguess';autoguessBtn.style.backgroundColor='var(--skribbl-red)'}return}chatForm.requestSubmit();console.log(`Autoguessed: ${word}`);guessedWordsThisRound.add(word);const dbResultsDiv=document.getElementById(dbResultsId);if(dbResultsDiv&&dbResultsDiv.style.display!=='none'){const buttonToDisable=dbResultsDiv.querySelector(`button[data-word="${word}"]`);if(buttonToDisable){buttonToDisable.classList.add('guessed');buttonToDisable.disabled=!0}}if(i<currentWordListForAutoguess.length-1){await sleep(delay)}}if(isAutoGuessing){console.log("Autoguess finished: exhausted word list.");isAutoGuessing=!1;if(autoguessBtn){autoguessBtn.textContent='Autoguess';autoguessBtn.style.backgroundColor='var(--skribbl-red)'}}
}
function createGUI() {
const existingContainer = document.getElementById(guiContainerId); if (existingContainer) { existingContainer.remove(); }
const existingPanel = document.getElementById(panelId); if(existingPanel) { existingPanel.remove(); }
const existingStyle = document.getElementById(styleId); if(existingStyle) { existingStyle.remove(); }
const css = ` :root { --skribbl-bg-dark: #1a1a2e; --skribbl-bg-med: #1f1f38; --skribbl-bg-light: #2a2a4a; --skribbl-text-input-light:rgb(32, 31, 31); --skribbl-text-light: #00f5d4; --skribbl-text-dark: #00f5d4; --skribbl-cyan: #00f5d4; --skribbl-cyan-hover: #00c4a6; --skribbl-blue: #0d6efd; --skribbl-grey: #6c757d; --skribbl-red: #dc3545; --skribbl-yellow: #ffc107; --skribbl-border: #40405f; } #${panelId} { position: fixed; top: 10px; right: 10px; width: 280px; background-color: var(--skribbl-bg-med); color: var(--skribbl-text-light); border: 1px solid var(--skribbl-border); border-radius: 8px; padding: 15px; padding-top: 40px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); display: none; z-index: 99998; max-height: 90vh; overflow-y: auto; font-family: 'Inter', sans-serif; opacity: 0; transform: translateX(20px); transition: opacity 0.3s ease, transform 0.3s ease; } #${panelId}.visible { opacity: 1; transform: translateX(0); } #${panelId}::-webkit-scrollbar { width: 10px; } #${panelId}::-webkit-scrollbar-track { background: var(--skribbl-bg-dark); border-radius: 5px; } #${panelId}::-webkit-scrollbar-thumb { background-color: var(--skribbl-cyan); border-radius: 5px; border: 2px solid var(--skribbl-bg-dark); } #${panelId}::-webkit-scrollbar-thumb:hover { background-color: var(--skribbl-cyan-hover); } #${closeGuiButtonId} { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 20px; font-weight: bold; color: var(--skribbl-grey); cursor: pointer; padding: 0 5px; line-height: 1; transition: color 0.2s ease; } #${closeGuiButtonId}:hover { color: var(--skribbl-text-light); } #${panelId} h4 { margin-top: 0; margin-bottom: 15px; text-align: center; color: var(--skribbl-text-light); } #${panelId} p { margin-top: 0; margin-bottom: 5px; font-weight: bold; } .${inputClass} { display: block; width: calc(100% - 14px); margin-bottom: 8px; padding: 8px; border: 1px solid var(--skribbl-border); border-radius: 4px; background-color: var(--skribbl-bg-light); color: var(--skribbl-text-input-light); font-family: inherit; font-size: 13px; transition: border-color 0.2s ease, box-shadow 0.2s ease; } .${inputClass}:focus { outline: none; border-color: var(--skribbl-cyan); box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.25); } #${panelId} button { width: 100%; padding: 9px 12px; margin-top: 5px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; font-family: inherit; font-size: 14px; transition: all 0.2s ease; } #${panelId} button:hover { filter: brightness(1.15); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); transform: translateY(-1px); } #${panelId} button:active { filter: brightness(0.95); transform: translateY(0px); box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); } #${drawButtonId} { background-color: var(--skribbl-blue); color: white; } #${dbButtonId} { background-color: var(--skribbl-grey); color: white; margin-bottom: 10px; } #${autoguessButtonId} { background-color: var(--skribbl-red); color: white; margin-bottom: 10px; } #${autoguessButtonId}.guessing { background-color: var(--skribbl-yellow); color: var(--skribbl-text-dark); } #${dbResultsId} { margin-top: 10px; padding: 10px; border: 1px dashed var(--skribbl-border); border-radius: 4px; min-height: 50px; max-height: ${wordDbResultsMaxHeight}; overflow-y: auto; display: none; font-size: 12px; word-break: break-word; background-color: var(--skribbl-bg-light); transition: max-height 0.3s ease; } #${dbResultsId} p { color: var(--skribbl-text-light); } #${dbResultsId} ul { list-style: none; padding-left: 5px; margin: 0; } #${dbResultsId} li { margin-bottom: 3px; } .skribbl-db-word-button { background: none; border: none; padding: 2px 4px; margin: 0; text-align: left; color: var(--skribbl-cyan); cursor: pointer; text-decoration: none; display: inline; font-family: inherit; font-size: inherit; border-radius: 3px; transition: background-color 0.2s ease, color 0.2s ease; } .skribbl-db-word-button:hover { background-color: rgba(0, 245, 212, 0.1); color: var(--skribbl-cyan-hover); } .skribbl-db-word-button.guessed, .skribbl-db-word-button:disabled { color: var(--skribbl-grey); text-decoration: line-through; cursor: default; background-color: transparent; } .skribbl-db-word-button.guessed:hover, .skribbl-db-word-button:disabled:hover { color: var(--skribbl-grey); text-decoration: line-through; background-color: transparent; } #${autoguessSliderId} { cursor: pointer; width: auto; margin: 0; flex-grow: 1; accent-color: var(--skribbl-cyan); height: 5px; } #${autoguessSliderId}::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; background: var(--skribbl-cyan); border-radius: 50%; cursor: pointer; margin-top: -5px; box-shadow: 0 0 5px rgba(0, 245, 212, 0.5); } #${autoguessSliderId}::-moz-range-thumb { width: 16px; height: 16px; background: var(--skribbl-cyan); border-radius: 50%; cursor: pointer; border: none; box-shadow: 0 0 5px rgba(0, 245, 212, 0.5); } #${autoguessSliderId}::-webkit-slider-runnable-track { height: 6px; background: var(--skribbl-bg-light); border-radius: 3px; border: 1px solid var(--skribbl-border); } #${autoguessSliderId}::-moz-range-track { height: 6px; background: var(--skribbl-bg-light); border-radius: 3px; border: 1px solid var(--skribbl-border); } #${autoguessDelayValueId} { min-width: 45px; text-align: right; flex-shrink: 0; color: var(--skribbl-text-light); } #skribblDrawAutoguessSliderContainer { display: flex; align-items: center; gap: 10px; font-size: 12px; width: 100%; } #${openButtonId} { padding: 8px 15px; background-color: var(--skribbl-bg-med); color: var(--skribbl-cyan); border: 1px solid var(--skribbl-cyan); border-radius: 20px; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 245, 212, 0.2); transition: all 0.2s ease; font-weight: bold; font-size: 14px; } #${openButtonId}:hover { background-color: var(--skribbl-bg-light); box-shadow: 0 3px 8px rgba(0, 245, 212, 0.4); transform: translateY(-1px); } #${openButtonId}:active { transform: translateY(0px); } `;
const styleSheet = document.createElement("style"); styleSheet.id = styleId; styleSheet.innerText = css; document.head.appendChild(styleSheet);
const container = document.createElement('div');container.id=guiContainerId; Object.assign(container.style,{position:'fixed',zIndex:'99999',top:'10px',left:'50%',transform:'translateX(-50%)'});
const openButton=document.createElement('button');openButton.id=openButtonId;openButton.textContent='✏️ Open GUI'; container.appendChild(openButton);
const panel=document.createElement('div');panel.id=panelId; Object.assign(panel.style,{position:'fixed',top:'10px',right:'10px',width:'280px',display:'none',zIndex:'99998'});
const closeButton=document.createElement('button');closeButton.id=closeGuiButtonId;closeButton.textContent='✕'; panel.appendChild(closeButton);
const title=document.createElement('h4');title.textContent='Skribbl.io cheats made by bleh2rich https://nohesi.lol'; panel.appendChild(title);
const drawSection=document.createElement('div'); const drawTitle=document.createElement('p');drawTitle.textContent='Draw Text:'; drawSection.appendChild(drawTitle); for(let i=0;i<maxLines;i++){const input=document.createElement('input');input.type='text';input.placeholder=`Line ${i+1}`;input.className=inputClass;drawSection.appendChild(input)} const drawButton=document.createElement('button');drawButton.id=drawButtonId;drawButton.textContent='Draw'; drawSection.appendChild(drawButton);panel.appendChild(drawSection);
const dbSection=document.createElement('div'); const dbButton=document.createElement('button');dbButton.id=dbButtonId;dbButton.textContent='Show/Refresh Word DB'; dbSection.appendChild(dbButton); const dbResultsDiv=document.createElement('div');dbResultsDiv.id=dbResultsId; dbSection.appendChild(dbResultsDiv);panel.appendChild(dbSection);
const autoguessSection=document.createElement('div'); const autoguessBtn=document.createElement('button');autoguessBtn.id=autoguessButtonId;autoguessBtn.textContent='Autoguess'; autoguessSection.appendChild(autoguessBtn); const sliderContainer=document.createElement('div'); sliderContainer.id = 'skribblDrawAutoguessSliderContainer'; const slider=document.createElement('input');slider.id=autoguessSliderId;slider.type='range';slider.min='25';slider.max='1000';slider.value=defaultAutoguessDelay; const delayValueSpan=document.createElement('span');delayValueSpan.id=autoguessDelayValueId;delayValueSpan.textContent=`${defaultAutoguessDelay}ms`; sliderContainer.appendChild(slider);sliderContainer.appendChild(delayValueSpan); autoguessSection.appendChild(sliderContainer);panel.appendChild(autoguessSection);
document.body.appendChild(container);document.body.appendChild(panel);
openButton.addEventListener('click', () => { const panel = document.getElementById(panelId); if(panel) { const isOpening = (panel.style.display === 'none' || panel.style.display === ''); if (isOpening) { panel.style.display = 'block'; setTimeout(() => panel.classList.add('visible'), 10); startHintObserver(); } else { panel.classList.remove('visible'); setTimeout(() => { panel.style.display = 'none'; }, 300); stopHintObserver(); } } });
closeButton.addEventListener('click', () => { stopHintObserver(); if (isAutoGuessing) { isAutoGuessing = false; if (autoGuessTimeoutId) clearTimeout(autoGuessTimeoutId); } const panel = document.getElementById(panelId); if (panel) { panel.classList.remove('visible'); setTimeout(() => { panel.style.display = 'none'; }, 300); } });
drawButton.addEventListener('click', async () => { const inputs=panel.getElementsByClassName(inputClass);const linesToDraw=[]; for(let i=0;i<inputs.length;i++){if(inputs[i].value.trim()!==''){linesToDraw.push(inputs[i].value)}} if(linesToDraw.length>0){ try{await drawTextLines(linesToDraw);}catch(error){console.error("Drawing script error:",error);alert("An error occurred during drawing.");}} });
dbButton.addEventListener('click', () => { guessedWordsThisRound.clear(); updateWordDbDisplay(); const resultsDiv = document.getElementById(dbResultsId); if(resultsDiv)resultsDiv.style.display = 'block'; startHintObserver(); });
slider.addEventListener('input', (e) => { currentAutoguessDelay=parseInt(e.target.value,10);delayValueSpan.textContent=`${currentAutoguessDelay}ms` });
autoguessBtn.addEventListener('click', () => { const button = document.getElementById(autoguessButtonId); if(isAutoGuessing){ isAutoGuessing=!1;if(autoGuessTimeoutId)clearTimeout(autoGuessTimeoutId); button.textContent='Autoguess';button.classList.remove('guessing'); } else { const hintInfo=getHintInfo();const db=parseWordDatabase(WORD_DATABASE_CSV_STRING); const{filteredWords}=filterWords(hintInfo,db); if(filteredWords.length>0){ isAutoGuessing=!0;button.textContent='Stop Autoguess';button.classList.add('guessing'); startAutoGuessing(filteredWords,currentAutoguessDelay); } else { alert("Cannot start autoguess: No possible words found."); } } });
}
function startHintObserver() {
if (hintObserver) return; const targetNode = document.querySelector("#game-word .container"); if (!targetNode) { return; }
const config = { childList: true, characterData: true, subtree: true };
const callback = function(mutationsList, observer) {
const dbResultsDiv = document.getElementById(dbResultsId); const isDbVisible = dbResultsDiv && dbResultsDiv.style.display !== 'none';
clearTimeout(window.skribblHintUpdateTimeout); window.skribblHintUpdateTimeout = setTimeout(() => {
const hintInfo = getHintInfo(); if (isDbVisible) { updateWordDbDisplay(); }
const currentlyGuessing = isAutoGuessing;
if (currentlyGuessing) {
const newWordList = isDbVisible ? currentWordListForAutoguess : filterWords(hintInfo, parseWordDatabase(WORD_DATABASE_CSV_STRING)).filteredWords;
isAutoGuessing = false; if (autoGuessTimeoutId) clearTimeout(autoGuessTimeoutId); autoGuessTimeoutId = null;
const autoguessBtn = document.getElementById(autoguessButtonId);
if (autoguessBtn) {
if (hintInfo && newWordList && newWordList.length > 0) {
const freshFiltered = filterWords(hintInfo, parseWordDatabase(WORD_DATABASE_CSV_STRING)).filteredWords; currentWordListForAutoguess = [...freshFiltered];
if (currentWordListForAutoguess.length > 0) {
isAutoGuessing = true; autoguessBtn.textContent = 'Stop Autoguess'; autoguessBtn.classList.add('guessing');
setTimeout(() => { if (isAutoGuessing) { startAutoGuessing(currentWordListForAutoguess, currentAutoguessDelay); } }, 50);
} else { autoguessBtn.textContent = 'Autoguess'; autoguessBtn.classList.remove('guessing'); }
} else { autoguessBtn.textContent = 'Autoguess'; autoguessBtn.classList.remove('guessing'); }
}
}
if (isAutoGuessing && !hintInfo) {
isAutoGuessing = false; const autoguessBtn = document.getElementById(autoguessButtonId);
if(autoguessBtn) { autoguessBtn.textContent = 'Autoguess'; autoguessBtn.classList.remove('guessing'); }
if (autoGuessTimeoutId) clearTimeout(autoGuessTimeoutId);
}
}, 250);
};
hintObserver = new MutationObserver(callback);
try { hintObserver.observe(targetNode, config); } catch (error) { hintObserver = null; }
}
function stopHintObserver() { if(hintObserver){hintObserver.disconnect();hintObserver=null;clearTimeout(window.skribblHintUpdateTimeout);} }
createGUI();
})();