From f1502836efe6bee8a3e658e63e36664c3f48a6d8 Mon Sep 17 00:00:00 2001
From: Prasad Chavan <97186762+prasad-chavan1@users.noreply.github.com>
Date: Thu, 12 Oct 2023 17:59:51 +0530
Subject: [PATCH 1/6] Added new game
---
.../Word Scrambler Game/Css/style.css | 75 +++++++++++++
.../Word Scrambler Game/Js/popup.js | 100 ++++++++++++++++++
.../Word Scrambler Game/popup.html | 35 ++++++
.../Word Scrambler Game/readme.md | 31 ++++++
4 files changed, 241 insertions(+)
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/Css/style.css
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/popup.html
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/readme.md
diff --git a/JavaScriptLogicGames/Word Scrambler Game/Css/style.css b/JavaScriptLogicGames/Word Scrambler Game/Css/style.css
new file mode 100644
index 0000000..2cd4d64
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/Css/style.css
@@ -0,0 +1,75 @@
+*{
+ font-family: poppins;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+body{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 100vh;
+ background: #1bb295;
+}
+.wrapper{
+ width: 450px;
+ border-radius: 7px;
+ background: #fff;
+}
+.wrapper h2{
+ font-size: 25px;
+ font-weight: 600;
+ padding: 18px 25px;
+ border-bottom: 1px solid #ccc;
+}
+.wrapper .data{
+ margin: 25px 20px 35px;
+}
+.data .word{
+ font-size: 33px;
+ font-weight: 500;
+ text-align: center;
+ letter-spacing: 24px;
+ text-transform: uppercase;
+ margin-right: -24px;
+}
+.data .details{
+ margin: 25px 0 20px;
+}
+.details p{
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.details p b{
+ font-weight: 600;
+}
+.data input{
+ width: 100%;
+ height: 60px;
+ outline: none;
+ padding: 0 16px;
+ border: 1px solid #aaa;
+ border-radius: 5px;
+ font-size: 18px;
+}
+.data .buttons{
+ display: flex;
+ margin-top: 20px;
+ justify-content: space-between;
+}
+.buttons button{
+ border: none;
+ outline: none;
+ color: #fff;
+ cursor: pointer;
+ width: calc(100% / 2 - 8px);
+ padding: 15px 0;
+ font-size: 17px;
+ border-radius: 5px;
+}
+.buttons .refresh-word{
+ background: #6c757d;
+}
+.buttons .check-word{
+ background: #1bb295;
+}
\ No newline at end of file
diff --git a/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js b/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
new file mode 100644
index 0000000..17a8d77
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
@@ -0,0 +1,100 @@
+const words = [
+ {
+ "word": "pocket",
+ "hint": "A bag for carrying small things"
+ },
+ {
+ "word": "needle",
+ "hint": "A thin & sharp metal pin"
+ },
+ {
+ "word": "expert",
+ "hint": "Person with extensive knowledge"
+ },
+ {
+ "word": "statement",
+ "hint": "A declaration of something"
+ },
+ {
+ "word": "library",
+ "hint": "Place containing collection of books"
+ },
+ {
+ "word": "second",
+ "hint": "It comes after first"
+ },
+ {
+ "word": "mobile",
+ "hint": "They are also called as movable species"
+ },
+ {
+ "word": "laptop",
+ "hint": "A device used to code program"
+ },
+ {
+ "word": "addition",
+ "hint": "The process of adding numbers"
+ },
+ {
+ "word": "number",
+ "hint": "Math symbols used for counting"
+ },
+ {
+ "word": "apple",
+ "hint": "A fruit that is red or green and often used to make pies."
+ },
+ {
+ "word": "banana",
+ "hint": "A long, curved fruit that is yellow when ripe."
+ },
+ {
+ "word": "cherry",
+ "hint": "A small, round fruit that is typically red or black."
+ },
+ {
+ "word": "orange",
+ "hint": "A citrus fruit that is orange in color."
+ },
+ {
+ "word": "grape",
+ "hint": "A small, juicy fruit that can be green, red, or purple."
+ }
+]
+
+
+const wordText = document.querySelector(".word"),
+hintText = document.querySelector(".hint span"),
+inputField = document.querySelector("input");
+const refreshBtn = document.querySelector(".refresh-word"),
+checkBtn = document.querySelector(".check-word");
+let correctWord;
+
+const initGame = () =>{
+ let randomObj = words[Math.floor(Math.random() * words.length)];
+ let wordArray = randomObj.word.split("");
+ for(let i = wordArray.length - 1; i > 0; i--){
+ let j = Math.floor(Math.random() * (i + 1));
+ [wordArray[i], wordArray[j]] = [wordArray[j], wordArray[i]];
+ }
+ wordText.innerText = wordArray.join("");
+ hintText.innerText = randomObj.hint;
+ correctWord = randomObj.word.toLowerCase();
+ inputField.value="";
+ inputField.setAttribute("maxlength", correctWord.length);
+ console.log(randomObj);
+}
+
+const checkword = ()=>{
+ let userWord = inputField.value.toLocaleLowerCase();
+ if (!userWord) return alert("Please enter a correct word.");
+ if(userWord !== correctWord) return alert(`Oops! ${userWord} is not a correct word.`);
+ else alert(`Congrats! ${userWord} is a correct word.`);
+ initGame();
+}
+
+
+initGame();
+
+
+refreshBtn.addEventListener("click", initGame);
+checkBtn.addEventListener("click", checkword);
\ No newline at end of file
diff --git a/JavaScriptLogicGames/Word Scrambler Game/popup.html b/JavaScriptLogicGames/Word Scrambler Game/popup.html
new file mode 100644
index 0000000..cfd37ca
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/popup.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ Word Scramble Game
+
+
+
+
+
+
+
+
+
+
+
Word Scramble Game
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/JavaScriptLogicGames/Word Scrambler Game/readme.md b/JavaScriptLogicGames/Word Scrambler Game/readme.md
new file mode 100644
index 0000000..74ddf24
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/readme.md
@@ -0,0 +1,31 @@
+# Word Scrambler Game
+
+Word Scrambler is a simple words game developed in JS using frontend as HTML and CSS.
+
+## Features
+
+- **Effortless Unscrambling:** Highlight scrambled letters on any webpage, right-click, and let the extension decipher them within seconds.
+
+- **Comprehensive Word List:** Receive a list of possible words, sorted by complexity, to choose from.
+
+- **Built-in Dictionary:** Explore word definitions, synonyms, and antonyms effortlessly.
+
+- **Customization:** Tailor settings to your preferences, adjusting word length, complexity, and language.
+
+
+## Feedback and Support
+
+If you encounter any issues or have suggestions for improvement, please [submit an issue](link-to-issue-tracker) on our GitHub repository.
+
+## Contributing
+
+We welcome contributions! If you'd like to contribute to this project, please check out our [contribution guidelines](link-to-contributing-guide).
+
+## Contributors
+
+- [Prasad Chavan](https://github.com/prasad-chavan1) - Developer
+
+
+---
+
+Thank you for choosing Word Scrambler Game! Enjoy unscrambling words like a pro.
From 1319c8da6d376d645c0774b7fc27aea4eb95dc76 Mon Sep 17 00:00:00 2001
From: Prashuu <97186762+prasad-chavan1@users.noreply.github.com>
Date: Sun, 15 Oct 2023 20:36:15 +0530
Subject: [PATCH 2/6] Delete JavaScriptLogicGames/Word Scrambler Game/Js
directory
---
.../Word Scrambler Game/Js/popup.js | 100 ------------------
1 file changed, 100 deletions(-)
delete mode 100644 JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
diff --git a/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js b/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
deleted file mode 100644
index 17a8d77..0000000
--- a/JavaScriptLogicGames/Word Scrambler Game/Js/popup.js
+++ /dev/null
@@ -1,100 +0,0 @@
-const words = [
- {
- "word": "pocket",
- "hint": "A bag for carrying small things"
- },
- {
- "word": "needle",
- "hint": "A thin & sharp metal pin"
- },
- {
- "word": "expert",
- "hint": "Person with extensive knowledge"
- },
- {
- "word": "statement",
- "hint": "A declaration of something"
- },
- {
- "word": "library",
- "hint": "Place containing collection of books"
- },
- {
- "word": "second",
- "hint": "It comes after first"
- },
- {
- "word": "mobile",
- "hint": "They are also called as movable species"
- },
- {
- "word": "laptop",
- "hint": "A device used to code program"
- },
- {
- "word": "addition",
- "hint": "The process of adding numbers"
- },
- {
- "word": "number",
- "hint": "Math symbols used for counting"
- },
- {
- "word": "apple",
- "hint": "A fruit that is red or green and often used to make pies."
- },
- {
- "word": "banana",
- "hint": "A long, curved fruit that is yellow when ripe."
- },
- {
- "word": "cherry",
- "hint": "A small, round fruit that is typically red or black."
- },
- {
- "word": "orange",
- "hint": "A citrus fruit that is orange in color."
- },
- {
- "word": "grape",
- "hint": "A small, juicy fruit that can be green, red, or purple."
- }
-]
-
-
-const wordText = document.querySelector(".word"),
-hintText = document.querySelector(".hint span"),
-inputField = document.querySelector("input");
-const refreshBtn = document.querySelector(".refresh-word"),
-checkBtn = document.querySelector(".check-word");
-let correctWord;
-
-const initGame = () =>{
- let randomObj = words[Math.floor(Math.random() * words.length)];
- let wordArray = randomObj.word.split("");
- for(let i = wordArray.length - 1; i > 0; i--){
- let j = Math.floor(Math.random() * (i + 1));
- [wordArray[i], wordArray[j]] = [wordArray[j], wordArray[i]];
- }
- wordText.innerText = wordArray.join("");
- hintText.innerText = randomObj.hint;
- correctWord = randomObj.word.toLowerCase();
- inputField.value="";
- inputField.setAttribute("maxlength", correctWord.length);
- console.log(randomObj);
-}
-
-const checkword = ()=>{
- let userWord = inputField.value.toLocaleLowerCase();
- if (!userWord) return alert("Please enter a correct word.");
- if(userWord !== correctWord) return alert(`Oops! ${userWord} is not a correct word.`);
- else alert(`Congrats! ${userWord} is a correct word.`);
- initGame();
-}
-
-
-initGame();
-
-
-refreshBtn.addEventListener("click", initGame);
-checkBtn.addEventListener("click", checkword);
\ No newline at end of file
From 9789471db117c73f35e138fec196768a26fc5af9 Mon Sep 17 00:00:00 2001
From: Prashuu <97186762+prasad-chavan1@users.noreply.github.com>
Date: Sun, 15 Oct 2023 20:36:43 +0530
Subject: [PATCH 3/6] added index.js
---
.../Word Scrambler Game/index.js | 100 ++++++++++++++++++
1 file changed, 100 insertions(+)
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/index.js
diff --git a/JavaScriptLogicGames/Word Scrambler Game/index.js b/JavaScriptLogicGames/Word Scrambler Game/index.js
new file mode 100644
index 0000000..8252cd7
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/index.js
@@ -0,0 +1,100 @@
+const words = [
+ {
+ "word": "pocket",
+ "hint": "A bag for carrying small things"
+ },
+ {
+ "word": "needle",
+ "hint": "A thin & sharp metal pin"
+ },
+ {
+ "word": "expert",
+ "hint": "Person with extensive knowledge"
+ },
+ {
+ "word": "statement",
+ "hint": "A declaration of something"
+ },
+ {
+ "word": "library",
+ "hint": "Place containing collection of books"
+ },
+ {
+ "word": "second",
+ "hint": "It comes after first"
+ },
+ {
+ "word": "mobile",
+ "hint": "They are also called as movable species"
+ },
+ {
+ "word": "laptop",
+ "hint": "A device used to code program"
+ },
+ {
+ "word": "addition",
+ "hint": "The process of adding numbers"
+ },
+ {
+ "word": "number",
+ "hint": "Math symbols used for counting"
+ },
+ {
+ "word": "apple",
+ "hint": "A fruit that is red or green and often used to make pies."
+ },
+ {
+ "word": "banana",
+ "hint": "A long, curved fruit that is yellow when ripe."
+ },
+ {
+ "word": "cherry",
+ "hint": "A small, round fruit that is typically red or black."
+ },
+ {
+ "word": "orange",
+ "hint": "A citrus fruit that is orange in color."
+ },
+ {
+ "word": "grape",
+ "hint": "A small, juicy fruit that can be green, red, or purple."
+ }
+]
+
+
+const wordText = document.querySelector(".word"),
+hintText = document.querySelector(".hint span"),
+inputField = document.querySelector("input");
+const refreshBtn = document.querySelector(".refresh-word"),
+checkBtn = document.querySelector(".check-word");
+let correctWord;
+
+const initGame = () =>{
+ let randomObj = words[Math.floor(Math.random() * words.length)];
+ let wordArray = randomObj.word.split("");
+ for(let i = wordArray.length - 1; i > 0; i--){
+ let j = Math.floor(Math.random() * (i + 1));
+ [wordArray[i], wordArray[j]] = [wordArray[j], wordArray[i]];
+ }
+ wordText.innerText = wordArray.join("");
+ hintText.innerText = randomObj.hint;
+ correctWord = randomObj.word.toLowerCase();
+ inputField.value="";
+ inputField.setAttribute("maxlength", correctWord.length);
+ console.log(randomObj);
+}
+
+const checkword = ()=>{
+ let userWord = inputField.value.toLocaleLowerCase();
+ if (!userWord) return alert("Please enter a correct word.");
+ if(userWord !== correctWord) return alert(`Oops! ${userWord} is not a correct word.`);
+ else alert(`Congrats! ${userWord} is a correct word.`);
+ initGame();
+}
+
+
+initGame();
+
+
+refreshBtn.addEventListener("click", initGame);
+checkBtn.addEventListener("click", checkword);
From b961a338b224304b0cf43180e948cefb547f938c Mon Sep 17 00:00:00 2001
From: Prashuu <97186762+prasad-chavan1@users.noreply.github.com>
Date: Sun, 15 Oct 2023 20:37:06 +0530
Subject: [PATCH 4/6] Delete JavaScriptLogicGames/Word Scrambler Game/Css
directory
---
.../Word Scrambler Game/Css/style.css | 75 -------------------
1 file changed, 75 deletions(-)
delete mode 100644 JavaScriptLogicGames/Word Scrambler Game/Css/style.css
diff --git a/JavaScriptLogicGames/Word Scrambler Game/Css/style.css b/JavaScriptLogicGames/Word Scrambler Game/Css/style.css
deleted file mode 100644
index 2cd4d64..0000000
--- a/JavaScriptLogicGames/Word Scrambler Game/Css/style.css
+++ /dev/null
@@ -1,75 +0,0 @@
-*{
- font-family: poppins;
- margin: 0;
- padding: 0;
- box-sizing: border-box;
-}
-body{
- display: flex;
- align-items: center;
- justify-content: center;
- min-height: 100vh;
- background: #1bb295;
-}
-.wrapper{
- width: 450px;
- border-radius: 7px;
- background: #fff;
-}
-.wrapper h2{
- font-size: 25px;
- font-weight: 600;
- padding: 18px 25px;
- border-bottom: 1px solid #ccc;
-}
-.wrapper .data{
- margin: 25px 20px 35px;
-}
-.data .word{
- font-size: 33px;
- font-weight: 500;
- text-align: center;
- letter-spacing: 24px;
- text-transform: uppercase;
- margin-right: -24px;
-}
-.data .details{
- margin: 25px 0 20px;
-}
-.details p{
- font-size: 18px;
- margin-bottom: 10px;
-}
-.details p b{
- font-weight: 600;
-}
-.data input{
- width: 100%;
- height: 60px;
- outline: none;
- padding: 0 16px;
- border: 1px solid #aaa;
- border-radius: 5px;
- font-size: 18px;
-}
-.data .buttons{
- display: flex;
- margin-top: 20px;
- justify-content: space-between;
-}
-.buttons button{
- border: none;
- outline: none;
- color: #fff;
- cursor: pointer;
- width: calc(100% / 2 - 8px);
- padding: 15px 0;
- font-size: 17px;
- border-radius: 5px;
-}
-.buttons .refresh-word{
- background: #6c757d;
-}
-.buttons .check-word{
- background: #1bb295;
-}
\ No newline at end of file
From 769814ac420fba3547b0e6561b4c95d1c59a5a6e Mon Sep 17 00:00:00 2001
From: Prashuu <97186762+prasad-chavan1@users.noreply.github.com>
Date: Sun, 15 Oct 2023 20:37:26 +0530
Subject: [PATCH 5/6] added style.css
---
.../Word Scrambler Game/style.css | 75 +++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 JavaScriptLogicGames/Word Scrambler Game/style.css
diff --git a/JavaScriptLogicGames/Word Scrambler Game/style.css b/JavaScriptLogicGames/Word Scrambler Game/style.css
new file mode 100644
index 0000000..4435f55
--- /dev/null
+++ b/JavaScriptLogicGames/Word Scrambler Game/style.css
@@ -0,0 +1,75 @@
+*{
+ font-family: poppins;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+body{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 100vh;
+ background: #1bb295;
+}
+.wrapper{
+ width: 450px;
+ border-radius: 7px;
+ background: #fff;
+}
+.wrapper h2{
+ font-size: 25px;
+ font-weight: 600;
+ padding: 18px 25px;
+ border-bottom: 1px solid #ccc;
+}
+.wrapper .data{
+ margin: 25px 20px 35px;
+}
+.data .word{
+ font-size: 33px;
+ font-weight: 500;
+ text-align: center;
+ letter-spacing: 24px;
+ text-transform: uppercase;
+ margin-right: -24px;
+}
+.data .details{
+ margin: 25px 0 20px;
+}
+.details p{
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.details p b{
+ font-weight: 600;
+}
+.data input{
+ width: 100%;
+ height: 60px;
+ outline: none;
+ padding: 0 16px;
+ border: 1px solid #aaa;
+ border-radius: 5px;
+ font-size: 18px;
+}
+.data .buttons{
+ display: flex;
+ margin-top: 20px;
+ justify-content: space-between;
+}
+.buttons button{
+ border: none;
+ outline: none;
+ color: #fff;
+ cursor: pointer;
+ width: calc(100% / 2 - 8px);
+ padding: 15px 0;
+ font-size: 17px;
+ border-radius: 5px;
+}
+.buttons .refresh-word{
+ background: #6c757d;
+}
+.buttons .check-word{
+ background: #1bb295;
+}
From 507a3e1d1903eb07a9caf36a6ff3df7a793b1406 Mon Sep 17 00:00:00 2001
From: Prashuu <97186762+prasad-chavan1@users.noreply.github.com>
Date: Sun, 15 Oct 2023 20:37:52 +0530
Subject: [PATCH 6/6] Update popup.html
---
JavaScriptLogicGames/Word Scrambler Game/popup.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/JavaScriptLogicGames/Word Scrambler Game/popup.html b/JavaScriptLogicGames/Word Scrambler Game/popup.html
index cfd37ca..caa31cf 100644
--- a/JavaScriptLogicGames/Word Scrambler Game/popup.html
+++ b/JavaScriptLogicGames/Word Scrambler Game/popup.html
@@ -9,8 +9,8 @@
-
-
+
+
@@ -32,4 +32,4 @@ Word Scramble Game
-