let wordList = ["juicy","power","kanye","chris","brown","juelz","sauce","money","cardi","racks","lewis","migos","bruno","glory","loyal","wayne","lamar","bling","drake","young","flava","freak","megan","gucci","quavo","logic","tiara","tpain","geazy","snoop","nasir","storm","belly","shaft","fresh","bones","crips","crash","drugs","bitch","truth","hurts","bodak","boner","scott","sicko","kills","crack","pussy","world","human","lyric","jason","shade","beats","style","rhyme","flows","dripp","grind","fiend","ghost","miami","flint","akron","tampa","brick","pound","jails","trick","bronx","vegas","jcole","beast","rocky","views","astro","flame","dirty","pablo","danny","xxxxx","tyler","music","group","death","after","rocks","stuss","pelle","gunit","kappa","dopey"];
let height = 6;
let row = 0;
let col = 0;
let gameOver = false;
let correctGuess = false;
const offsetFromDate = new Date(2023,0,1);
const msOffset = Date.now() - offsetFromDate;
const dayOffset = msOffset / 1000 / 60 / 60 / 24;
const word = wordList[Math.floor(dayOffset)];
console.log(word);
let todayPlayed = {};
let allTimeGamePlayed = [];
let todayplayeddone = false;
let dateTime = new Date();
let currentYear = dateTime.getFullYear();
let currentMonth = dateTime.getMonth();
let currentDate = dateTime.getDate();
if(currentMonth < 10)
currentMonth = "0"+currentMonth;
if(currentDate < 10)
currentDate = "0"+currentDate;
let todayDate = currentYear+"-"+currentMonth+"-"+currentDate;
window.onload = function() {
intializeEnglish();
}
function copyToClipBoard()
{
hidePlayed();
let todayWordlePlayed = JSON.parse(localStorage.getItem("todayWordlePlayed"));
if(todayWordlePlayed != null)
{
for(let d = 0; d < todayWordlePlayed.length; d++)
{
if(todayWordlePlayed[d]["date"] == todayDate)
{
let copyScore = "Wordle "+todayWordlePlayed[d]["todayWordle"]+" Score : "+todayWordlePlayed[d]["score"]+"/6";
navigator.clipboard.writeText(copyScore);
let messageBox = document.getElementById("message-box");
messageBox.textContent = "Score copied!";
messageBox.style.display = "flex";
setTimeout(() => {
messageBox.style.display = "none";
}, 2000);
break;
}
}
}
}
function checkTodayPlayed()
{
let todayWordlePlayed = JSON.parse(localStorage.getItem("todayWordlePlayed"));
if(todayWordlePlayed != null)
{
for(let d = 0; d < todayWordlePlayed.length; d++)
{
if(todayWordlePlayed[d]["date"] == todayDate)
{
todayplayeddone = true;
for(let h = 0; h < todayWordlePlayed[d]["guesses"].length; h++)
{
for (let r = 0; r < 5; r++)
{
document.getElementById(h+"-"+r).innerHTML = todayWordlePlayed[d]["guesses"][h][r];
if(todayWordlePlayed[d]["letterAPC"][h][r] == "A")
document.getElementById(h+"-"+r).classList.add("absent");
else if(todayWordlePlayed[d]["letterAPC"][h][r] == "P")
document.getElementById(h+"-"+r).classList.add("present");
else if(todayWordlePlayed[d]["letterAPC"][h][r] == "C")
document.getElementById(h+"-"+r).classList.add("correct");
}
}
let keys = document.querySelectorAll(".key-tile");
for(let k = 0; k < keys.length; k++)
{
keys[k].style.cursor = "default";
keys[k].style.pointerEvents = "none";
}
document.querySelector(".enter-key-tile").style.cursor = "default";
document.querySelector(".enter-key-tile").style.pointerEvents = "none";
document.getElementById("played").style.display = "block";
document.getElementById("todayWordle").style.display = "inline-block";
document.getElementById("todayWordle").innerHTML = todayWordlePlayed[d]["todayWordle"];
document.getElementById("yourScore").innerHTML = todayWordlePlayed[d]["score"]+"/6";
break;
}
}
}
}
function intializeEnglish()
{
width = word.length;
for (let r = 0; r < height; r++) {
for (let c = 0; c < width; c++) {
let tile = document.createElement("span");
tile.id = r.toString() + "-" + c.toString();
tile.classList.add("tile");
tile.innerText = "";
document.getElementById("board").appendChild(tile);
}
}
let x = 60 * width;
document.getElementById("board").style.width = x + "px";
let keyboard = [
["Q","W","E","R","T","Y","U","I","O","P"],
["A","S","D","F","G","H","J","K","L"],
["ENT","Z","X","C","V","B","N","M","⌫"]];
for (let i = 0; i < keyboard.length; i++)
{
let currRow = keyboard[i];
let keyboardRow = document.createElement("div");
keyboardRow.classList.add("keyboard-row");
for (let j = 0; j < currRow.length; j++)
{
let keyTile = document.createElement("div");
let key = currRow[j];
keyTile.innerText = key;
if (key == "ENT") {
keyTile.id = "Enter";
}
else if (key == "⌫") {
keyTile.id = "Backspace";
}
else if ("A" <= key && key <= "Z") {
keyTile.id ="Key" + key;
}
keyTile.addEventListener("click", processKey);
if (key == "ENT") {
keyTile.classList.add("enter-key-tile");
} else {
keyTile.classList.add("key-tile");
}
if (key == "⌫") {
keyTile.classList.add("key-tile");
keyTile.innerText = String.fromCharCode(9003);
}
keyboardRow.appendChild(keyTile);
}
document.getElementById("keyboard").appendChild(keyboardRow);
}
checkTodayPlayed();
document.addEventListener("keyup",function(e){
processInput(e);
});
}
function saveToLocalStorage()
{
todayWordleGamePlayed = JSON.parse(localStorage.getItem("todayWordlePlayed"));
if(todayWordleGamePlayed == null)
{
todayPlayed.date = currentYear+"-"+currentMonth+"-"+currentDate;
todayPlayed.word = word;
todayPlayed.guesses = typedWords;
todayPlayed.letterAPC = allGuesses;
todayPlayed.todayWordle = wordList.indexOf(word)+1;
if(correctGuess == true)
todayPlayed.score = allGuesses.length;
else
todayPlayed.score = "X";
allTimeGamePlayed.push(todayPlayed);
localStorage.setItem("todayWordlePlayed", JSON.stringify(allTimeGamePlayed));
}
else
{
todayPlayed.date = currentYear+"-"+currentMonth+"-"+currentDate;
todayPlayed.word = word;
todayPlayed.guesses = typedWords;
todayPlayed.letterAPC = allGuesses;
todayPlayed.todayWordle = wordList.indexOf(word)+1;
if(correctGuess == true)
todayPlayed.score = allGuesses.length;
else
todayPlayed.score = "X";
todayWordleGamePlayed.push(todayPlayed);
localStorage.setItem("todayWordlePlayed", JSON.stringify(todayWordleGamePlayed));
}
document.getElementById("played").style.display = "block";
document.getElementById("todayWordle").style.display = "inline-block";
document.getElementById("todayWordle").innerHTML = wordList.indexOf(word)+1;
if(correctGuess == true)
document.getElementById("yourScore").innerHTML = allGuesses.length+"/6";
else
document.getElementById("yourScore").innerHTML = "X/6";
}
function processKey()
{
let e = {"code" : this.id};
processInput(e);
}
let typedWords = [];
let enteredWord="";
function processInput(e)
{
if (gameOver) return;
if ("KeyA" <= e.code && e.code <= "KeyZ")
{
if (col < width)
{
let currTile = document.getElementById(row.toString() + '-' + col.toString());
if (currTile.innerText == "" && currTile.dataset.disabled != "yes")
{
currTile.innerText = e.code[3];
enteredWord = enteredWord + e.code[3];
col += 1;
}
}
}
else if (e.code == "Backspace")
{
if (0 < col && col <= width)
{
col -= 1;
enteredWord = enteredWord.slice(0, -1);
}
let currTile = document.getElementById(row.toString() + '-' + col.toString());
currTile.innerText = "";
}
else if (e.code =="Enter" && col == width)
{
if (wordList.includes(enteredWord.toLowerCase()))
{
typedWords.push(enteredWord);
update();
enteredWord = "";
}
else if (!wordList.includes(enteredWord.toLowerCase()))
{
let messageBox = document.getElementById("message-box");
messageBox.textContent = "Not in word list!";
messageBox.style.display = "flex";
setTimeout(() => {
messageBox.style.display = "none";
}, 5000);
}
}
if(!gameOver && row == height)
{
gameOver = true;
messageBox = document.getElementById("message-box");
messageBox.textContent = "Almost! Good luck next time!\n Correct Word is :"+word;
messageBox.style.display = "flex";
setTimeout(() => {
messageBox.style.display = "none";
saveToLocalStorage();
}, 3000);
let currentWordIndex = parseInt(localStorage.getItem('currentWordIndex'));
currentWordIndex--;
localStorage.setItem('currentWordIndex', currentWordIndex.toString());
}
}
let result = [];
function check(input, wordle)
{
const letters = Array.from(input.toUpperCase()),
word = Array.from(wordle.toUpperCase());
result = Array(5).fill('');
for (let i = 0; i < 5; i++)
{
if (letters[i] === word[i])
{
result[i] = 'green',
word[i] = '';
letters[i] = '';
}
}
for (let i = 0; i < 5; i++)
{
if (!letters[i]) continue;
const index = word.indexOf(letters[i]);
if (index !== -1)
{
result[i] = 'yellow',
word[index] = '';
}
}
return result;
}
let allGuesses = [];
let typedLetters = "";
function update()
{
let guess = "";
for(let c = 0; c < width; c++)
{
let currTile = document.getElementById(row.toString() + "-" + c.toString());
currTile.style.color = "white";
let letter = currTile.innerText;
guess += letter;
}
guess = guess.toLowerCase();
check(guess,word);
let correct = 0;
let letterCount = {};
for (let i = 0; i < word.length; i++)
{
letter = word[i];
if (letterCount[letter])
letterCount[letter] += 1;
else
letterCount[letter] = 1;
}
for(let c= 0; c < width; c++)
{
let currTile = document.getElementById(row.toString() + '-' + c.toString());
let letter = currTile.innerText;
if(result[c] == "green")
{
currTile.classList.add("correct");
let keyTile = document.getElementById("Key" + letter);
keyTile.classList.remove("present");
keyTile.classList.add("correct");
correct += 1;
letterCount[letter] -= 1;
if(correct == width) {
gameOver = true;
correctGuess = true;
let messageBox = document.getElementById("message-box");
messageBox.textContent = "You did it! Great Job!";
messageBox.style.display = "flex";
setTimeout(() => {
messageBox.style.display = "none";
saveToLocalStorage();
}, 3000);
}
}
}
typedLetters = "";
for (let c= 0; c < width; c++)
{
let currTile = document.getElementById(row.toString() + '-' + c.toString());
let letter = currTile.innerText.toLowerCase();
if(!currTile.classList.contains("correct"))
{
if(result[c] == "yellow" && letterCount[letter] > 0)
{
typedLetters += "P";
currTile.classList.add("present");
let keyTile = document.getElementById("Key" + letter.toUpperCase());
if(!keyTile.classList.contains("correct"))
keyTile.classList.add("present");
letterCount[letter] -= 1;
}
else
{
typedLetters += "A";
currTile.classList.add("absent");
let keyTile = document.getElementById("Key" + letter.toUpperCase());
if(keyTile.classList.contains("correct"))
continue;
else
keyTile.classList.add("absent");
}
}
else
typedLetters += "C";
}
allGuesses.push(typedLetters);
row += 1;
col = 0;
result = [];
}
function hidePlayed()
{
document.getElementById("played").style.display = "none";
document.querySelectorAll(".tile").forEach(tile => {
tile.dataset.disabled = "yes";
});
document.querySelectorAll(".key-tile").forEach(keytile => {
keytile.style.cursor = "default";
keytile.style.pointerEvents = "none";
});
document.querySelector(".enter-key-tile").style.cursor = "default";
document.querySelector(".enter-key-tile").style.pointerEvents = "none";
}
document.getElementById("hidePlayed").addEventListener("click", function() {
hidePlayed();
});
If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:
jQuery(document).ready(function( $ ){
// body
{
font-family: Helvetica, sans-serif;
text-align: center;
margin: 0 auto;
color: #000;
}
h1
{
height: 100%;
margin: 0 auto;
border: 30px solid transparent;
}
#board
{
height: 350px;
margin: 0 auto 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.tile
{
border: 2px solid rgb(65, 65, 65);
width: 50px;
height: 50px;
margin: 2.5px;
font-size: 30px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
}
.tile.correct
{
background-color: green;
color: white;
border-color: white;
}
.tile.present
{
background-color: rgb(211, 211, 0);
color: white;
border-color: white;
}
.tile.absent
{
background-color: #4b4b4b;
color: white;
border-color: white;
}
.keyboard-row
{
width: 440px;
height: 70px;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
background-color: transparent;
justify-content: center;
align-items: center;
}
.key-tile
{
border: 1px solid rgb(65,65,65);
width: 30px;
height: 45px;
margin: 3px;
border-radius: 5px;
cursor: pointer;
background-color: transparent;
font-size: 20px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
color: rgb(65,65,65);
}
.key-tile.present
{
color: #fff;
background: rgb(211,211,0);
}
.key-tile.absent
{
color: #fff;
background: rgb(75,75,75);
}
.key-tile.correct
{
color: #fff;
background: green;
}
.enter-key-tile
{
border: 1px solid rgb(65,65,65);
width: 60px;
height: 45px;
margin: 3px;
border-radius: 5px;
cursor: pointer;
background-color: transparent;
font-size: 20px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
color: rgb(65,65,65);
}
#message-box
{
display: none;
z-index: 99;
position: absolute;
left: 50%;
top: 30%;
transform: translate(-50%,-50%);
justify-content: center;
align-items: center;
background-color: white;
height: 100px;
width: 350px;
border: 1px solid #000;
border-radius: 20px;
opacity: 1;
transition: opacity 1s ease-in-out;
animation: fade-out 2s 1s forwards;
}
#shareScore
{
display: none;
}
.shareScoreBtn
{
background: green;
color: #fff;
cursor: pointer;
font-size: 30px;
font-weight: bold;
padding: 5px 10px;
border: none;
margin: 10px 0 20px;
}
@keyframes fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
#settings-button
{
height: 50px;
width: 50px;
position: absolute;
top: 20px;
right: 20px;
cursor: pointer;
color: #000;
background-color: transparent;
font-size: 35px;
border-radius: 30px;
border: transparent;
}
#settings-button:active
{
font-size: 32px;
}
.letters
{
width: 50px;
height: 50px;
}
.pLetter
{
background: rgb(211, 211, 0);
}
.cLetter
{
background: green;
}
.aLetter
{
background: #4b4b4b;
}
.played
{
display: none;
position: absolute;
box-sizing: border-box;
padding: 6% 20px;
margin: 0 auto 0 -25%;
width: 50%;
top: 15%;
left: 50%;
color: #000;
background: #efefef;
border-radius: 5px;
text-align: center;
}
.played h1
{
color: #000;
}
#hidePlayed
{
position: absolute;
top: 20px;
right: 20px;
background: none;
border-radius: 5px;
padding: 5px 6px;
font-size: 24px;
color: #000;
border: none;
cursor: pointer;
opacity: 0.5;
font-weight: bold;
}
@media only screen and (max-width: 450px)
{
#title
{
font-size: 30px;
}
#settings-button
{
width: 40px;
height: 40px;
}
.keyboard-row
{
width: 100%;
}
.key-tile
{
width: 32px;
height: 40px;
font-size: 20px;
}
.enter-key-tile
{
width: 70px;
height: 40px;
font-size: 20px;
}
.played
{
width: 96%;
left: 2%;
margin: 0;
min-height: 600px;
padding: 6% 5px;
}
.played h1
{
font-size: 24px;
}
}
@media only screen and (max-width: 400px)
{
#title
{
font-size: 24px;
}
.key-tile
{
width: 30px;
height: 40px;
font-size: 20px;
}
.enter-key-tile
{
width: 66px;
font-size: 20px;
}
}
@media only screen and (max-width: 390px)
{
.key-tile
{
width: 28px;
height: 40px;
font-size: 18px;
}
.enter-key-tile
{
width: 64px;
height: 40px;
font-size: 18px;
}
}
});
--
If you want to link a JavaScript file that resides on another server (similar to
), then please use
the
The Hip Hop Wordle
The Hip Hop Wordle
The Hip Hop Wordle Your Score : Thanks for playing today! Come back tomorrow to play again!
SHARE
X
page, as this is a HTML code that links a JavaScript file.
End of comment */
Skip to content
Who we are Our website address is: https://streetmoneymagazine.com.
Comments When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.
Media If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.
Cookies If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.
If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.
When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select “Remember Me”, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.
If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.
Embedded content from other websites Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.
These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.
Who we share your data with : If you request a password reset, your IP address will be included in the reset email.
How long we retain your data If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.
For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.
What rights you have over your data If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.
Where your data is sent Visitor comments may be checked through an automated spam detection service.
‘When connecting to our radio stream, your IP address will be sent to our radio service provider in order for us to track listening trends and provide licensing bodies with royalty reports. Once our service provider receives your IP it is immediately anonymised, deleted and becomes untraceable. This data is never sold on or passed to other companies. For iOS Apps The Street Money iOS App does not collect any user data when installed or launched on your device. For Android Apps The Street Money Android App does not collect any user data during use. In order to provide audio control during Phone App use, the App will monitor the ‘state’ of the phone App (Idle, in call, call ended) if applicable on your device. At no point will the App be able to listen in or derive phone numbers or data. The Android App also requires access to local storage. This is to store its configuration for faster launch times.