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!
page, as this is a HTML code that links a JavaScript file.
End of comment */
Skip to content
Click here to watch the video
Watch the official video for Offset‘s “Say My Grace” Stream // Download Offset ‘s “Set It Off” here: https://offset.lnk.to/SetItOff Follow Offset Everywhere: Facebook: https://www.facebook.com/91OFFSETYRN TikTok: https://www.tiktok.com/@offsetyrn Instagram: https://www.instagram.com/offsetyrn Twitter: https://www.twitter.com/offsetyrn Lyrics: Whoa Hey! Hook [Offset]: Make room on my plate I just said my grace and then I ate. Gotta particular taste. I just stuffed my pockets in my face Ok Let’s have a debate we talking bout poppin I promise I’m feeling a way (who) I took the bodies up outta my closet. I buried em deep and they still in the way. Verse 1 [Offset]: I know some lil niggas got baptized Trap Gods, they can’t put the drilling away Had to part ways with the sad vibes bad guys. You might be a villain today. (hey) Ask god why I didn’t get a answer (why) Why I lose my brother to bullets (why) Why I lose my grandma to cancer. (why) Why me god I need answers (why) Why a young nigga straight out Atlanta (why) Why the judge n the cops tryna jam us (why) Why I keep getting all of these chances (why) Why me god I need answers (hey) Speak ya mind and you might get canceled (canceled) Pinky Ring and it cost me a phantom (phantom) Wack the witness the evidence tampered (wack em) Dirty Money the safe is the hamper (dirty money) Yeah my bitch she a star and I stamped her (stamped her) P. E. jordan 3 this the sampler (P. E.) Ion wanna do it but I gotta do it. Gotta kill ya nigga if it’s me or you. (hey) He got fire I got fye nigga lighter fluid (fye) Gotta away from the Haters say hallelujah Shit be crazy the shit be the closest to you (crazy) It’s ok cuz they know that I come to do it. (hey) Hold ya V up for Virgil Exclusive Louie (V) Bitches geeking n tweaking. I hit a Uey (geekin) Wrist hitting n glistening this shit a movie (glisten) If it’s smoke at the door then I’m tending to it. (smoke) Watch when I step murakami my belt (hey) Angel on my shoulder but the Devil on the left (devil) I gotta mil not mil for my shelf (million) I do it alone I own myself. (alone) Niggas stay home before your dome get left. (baow) Niggas playing dirty hit below my belt (dirty) Ima get the bag do the show myself (show) Do that shit again had to show myself Hook [Offset]: Make room on my plate I just said my grace and then I ate. Gotta particular taste. I just stuffed my pockets in my face Ok Let’s have a debate we talkin bout poppin I promise I’m feeling a way (who) I took the bodies up outta my closet. I buried em deep and they still in the way. Verse 2 [Travis Scott]: I filled up the crib with cars the halls with all n all im still having space Gotta particular taste picky eater I guess But I’m still stuffing my face (yeah) She gotta natural wrap like a natural do Like the blunt she don’t like the shit laced I was outside of the building I’m owning the spot Want a B you gotta have faith. I’m in a meditate state Ever since we lost bro ain’t really much more I can Take I pop a 10 when it’s late Momma told me to pray I do that cause you know I can’t play(hey) We flood the field up fr We Got the rides in the back but you know we ain’t come here to play (hey) You up be playing the stakes I been up playing abroad With Broads n Mates (yeah) Hook [Offset]: Make room on my plate I just said my grace and then I ate. Gotta particular taste. I just stuffed my pockets in my face Ok Let’s have a debate we talking bout popping I promise I’m feeling a way (who) I took the bodies up outta my closet. I buried em deep and they still in the way Music video by Offset, Travis Scott performing SAY MY GRACE. Motown Records; © 2023 UMG Recordings, Inc. http://vevo.ly/z0a8Wu