Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
v3.0.5
  • Loading branch information
Gurge44 committed Jul 17, 2023
1 parent 1fcbc80 commit 086f6c4
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ <h1 id="title">Customized Wordle</h1>
<p id="animationsLine"><label><input type="checkbox" name="animations" id="animations" checked>Enable Animations</label></p>
<p id="numOfGuesses" title="Changing this value automatically restarts the game and generates a new word to guess.">Number of Guesses: <input type="number" name="numOfGuessesType" id="numOfGuessesType" min="1" max="20" value="9" class="input"></p>
<p id="wordLength" title="Changing this value automatically restarts the game and generates a new word to guess.">Word Length: <input type="number" name="wordLengthInput" id="wordLengthInput" min="3" max="16" value="5" class="input"> <span id="tooFewWords" hidden title="The database is a bit weak of words in the length you chose. Some valid words may not be accepted.">⚠️</span></p>
<p id="squareFontLine"><label><input type="checkbox" name="squareFont" id="squareFont" checked>Square Font for Timers</label></p>
</div>
<div id="main" hidden>
<h2 style="color: rgb(0, 255, 200);" id="h2title">Color customization</h2>
Expand Down
3 changes: 3 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The FontStruction “square deal”
(http://fontstruct.com/fontstructions/show/1029169) by “GeronimoFonts” is
licensed under a All Rights Reserved license ().
26 changes: 26 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
The font file in this archive was created using Fontstruct the free, online
font-building tool.
This font was created by “GeronimoFonts”.
This font has a homepage where this archive and other versions may be found:
http://fontstruct.com/fontstructions/show/1029169

Try Fontstruct at http://fontstruct.com
It’s easy and it’s fun.

NOTE FOR FLASH USERS: Fontstruct fonts (fontstructions) are optimized for Flash.
If the font in this archive is a pixel font, it is best displayed at a font-size
of 8.

Fontstruct is sponsored by FontShop.
Visit them at http://fontshop.com
FontShop is the original independent font retailer. We’ve been around since
the dawn of digital type. Whether you need the right font or need to create the
right font from scratch, let our 23 years of experience work for you.

Fontstruct is copyright ©2014 Rob Meek

LEGAL NOTICE:
In using this font you must comply with the licensing terms described in the
file “license.txt” included with this archive.
If you redistribute the font file in this archive, it must be accompanied by all
the other files from this archive, including this one.
50 changes: 48 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
document.getElementById("error").innerHTML = "Loading....";
let version = "v3.0.4+";
let version = "v3.0.5";
document.getElementById("title").innerText = "Customized Wordle " + version;
toastr.options.progressBar = true;

Expand Down Expand Up @@ -62,6 +62,8 @@ var entireGuessTimeChange = 0;
var timeChangePositiveColor = "#00ff00";
var noTimeChangeColor = "#ffe135";
var timeChangeNegativeColor = "#ff0000";
var isSquare = true;
var isGuessCheckInProgress = false;

function applyColorConfig() {
document.body.style.backgroundColor = document.getElementById("BackgroundColor").value;
Expand Down Expand Up @@ -269,6 +271,15 @@ document.querySelector('#showSettings').addEventListener("click", () => {

function startTimers() {
document.getElementById("change").innerHTML = "";
if (!document.getElementById("squareFont").checked) {
document.getElementById("per-GuessTimer").style.fontFamily = 'Segoe UI';
document.getElementById("mainTimer").style.fontFamily = 'Segoe UI';
isSquare = false;
} else {
document.getElementById("per-GuessTimer").style.fontFamily = 'squareFont';
document.getElementById("mainTimer").style.fontFamily = 'squareFont';
isSquare = true;
}
restart();
if (document.getElementById("enableMainTimer").checked && !mainTimerRunning) {
startMainTimer();
Expand Down Expand Up @@ -325,11 +336,37 @@ function startMainTimer() {
totalSecondsLeft = 60;
}
totalSecondsLeft -= 1;
var pull = 0;
var pull2 = 0;
var pull3 = 0;
var pull4 = 0;
if (totalSecondsLeft < 10) {
totalSecondsLeftDisplay = "0" + totalSecondsLeft;
} else {
totalSecondsLeftDisplay = totalSecondsLeft;
}
if (isSquare) {
if (totalSecondsLeft <= 19 && totalSecondsLeft >= 10) {
pull = 8;
} else {
pull = 0;
}
if (totalSecondsLeft % 10 === 1) {
pull2 = 10;
} else {
pull2 = 3;
}
if (totalMinutesLeft <= 19 && totalMinutesLeft >= 10) {
pull3 = 8;
} else {
pull3 = 0;
}
if (totalMinutesLeft % 10 === 1) {
pull4 = 10;
} else {
pull4 = 3;
}
}
if (totalSecondsLeft <= warningTime && totalMinutesLeft <= 0) {
if (outputWarn) {
toastr.warning("Warning! " + totalSecondsLeft + " seconds left!");
Expand All @@ -346,7 +383,7 @@ function startMainTimer() {
mainTimerRunning = false;
cancel3 = true;
}
document.getElementById("mainTimer").innerHTML = totalMinutesLeft + ":" + totalSecondsLeftDisplay;
document.getElementById("mainTimer").innerHTML = "<nobr><span style='margin-left: " + pull3 + "px; letter-spacing: " + pull4 + "px;'>" + totalMinutesLeft + "</span>:<span style='margin-left: " + pull + "px; letter-spacing: " + pull2 + "px;'>" + totalSecondsLeftDisplay + "</span></nobr>";
}
}, 1000);
}
Expand Down Expand Up @@ -522,6 +559,8 @@ function shadeKeyBoard(letter, color) {

function checkGuess() {

isGuessCheckInProgress = true;

let row = document.getElementsByClassName("letter-row")[NUMBER_OF_GUESSES - guessesRemaining]
let guessString = '';
let rightGuess = Array.from(rightGuessString);
Expand Down Expand Up @@ -775,6 +814,7 @@ function checkGuess() {
toastr.info(`The right word was: "${rightGuessString}"`);
}
}
isGuessCheckInProgress = false;
}

function delay(milliseconds) {
Expand Down Expand Up @@ -912,6 +952,12 @@ function restart() {
if (guessesRemaining === NUMBER_OF_GUESSES) {
return;
}
if (isGuessCheckInProgress) {
setTimeout(() => {
restart();
}, 100);
return;
}
if (onCooldown) {
if (restartInQueue) {
return;
Expand Down
Binary file added square-deal.ttf
Binary file not shown.
16 changes: 14 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@font-face {
font-family: squareFont;
src: url(square-deal.ttf);
}

h1 {
text-align: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
Expand Down Expand Up @@ -152,7 +157,7 @@ body {
transition: 0.2s;
}

#autoRestartLine, #animationsLine, #settingsLine, #enableMainTimerLine, #enablePer-GuessTimerLine, #enableLoggingLine {
#autoRestartLine, #animationsLine, #settingsLine, #enableMainTimerLine, #enablePer-GuessTimerLine, #enableLoggingLine, #squareFontLine {
text-align: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 1.5em;
Expand All @@ -162,7 +167,7 @@ body {
transition: 0.2s;
}

#autoRestart, #animations, #enableMainTimer, #enablePer-GuessTimer, #enableLogging {
#autoRestart, #animations, #enableMainTimer, #enablePer-GuessTimer, #enableLogging, #squareFont {
scale: 1.5;
margin-right: 10px;
transition: 0.2s;
Expand Down Expand Up @@ -297,6 +302,13 @@ input[type=color] {
margin-bottom: 20px;
}

#per-GuessTimer, #mainTimer {
font-family: squareFont;
font-size: 30px;
letter-spacing: 2px;
width: 70px;
}

#openDebugOptions {
padding-top: 7px;
padding-left: 8px;
Expand Down

0 comments on commit 086f6c4

Please sign in to comment.