Skip to content

Commit

Permalink
Merge branch 'yash-work2' of https://github.com/Yashgabani845/GGExten…
Browse files Browse the repository at this point in the history
…sions into yash-work2
  • Loading branch information
Yashgabani845 committed Jun 4, 2024
2 parents e50b020 + d597d61 commit ff1807e
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 28 deletions.
12 changes: 6 additions & 6 deletions Focus Mate/HTML/performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@
<ul>
<li>
<i class="bx bxs-home" id="home"></i>
<a href="#">Home</a>
<a href="popup.html">Home</a>
</li>
<li>
<i class="bx bx-laptop" id="workingSession"></i>
<a href="#">Working Session</a>
<a href="working_session.html">Working Session</a>
</li>
<li>
<i class="bx bx-block" id="websiteBlocking"></i>
<a href="#">Website Blocking</a>
<a href="website_blocking.html">Website Blocking</a>
</li>
<li>
<i class="bx bx-time-five" id="pomodoro"></i>
<a href="#">Pomodoro</a>
<a href="pomodoro.html">Pomodoro</a>
</li>
<li>
<i class="bx bx-edit" id="todoList"></i>
<a href="#">To-Do List</a>
<a href="todo_list.html">To-Do List</a>
</li>
<li class="active">
<i class="bx bx-signal-5" id="progress"></i>
<a href="#">Progress Tracking</a>
<a href="performance.html">Progress Tracking</a>
</li>
</ul>
</div>
Expand Down
12 changes: 6 additions & 6 deletions Focus Mate/HTML/pomodoro.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@
<ul>
<li>
<i class="bx bxs-home" id="home"></i>
<a href="#">Home</a>
<a href="popup.html">Home</a>
</li>
<li>
<i class="bx bx-laptop" id="laptop"></i>
<a href="#">Working Session</a>
<a href="working_session.html">Working Session</a>
</li>
<li class>
<i class="bx bx-block"></i>
<a href="#">Website Blocking</a>
<a href="website_blocking.html">Website Blocking</a>
</li>
<li class="active">
<i class="bx bx-time-five"></i>
<a href="#">Pomodoro</a>
<a href="pomodoro.html">Pomodoro</a>
</li>
<li>
<i class="bx bx-edit"></i>
<a href="#">To-Do List</a>
<a href="todo_list.html">To-Do List</a>
</li>
<li>
<i class="bx bx-signal-5"></i>
<a href="#">Progress Tracking</a>
<a href="performance.html">Progress Tracking</a>
</li>
</ul>
</div>
Expand Down
12 changes: 6 additions & 6 deletions Focus Mate/HTML/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@
<ul>
<li class="active">
<i class="bx bxs-home" id="home"></i>
<a href="#">Home</a>
<a href="popup.html">Home</a>
</li>
<li>
<i class="bx bx-laptop" id="workingSession"></i>
<a href="#">Working Session</a>
<a href="working_session.html">Working Session</a>
</li>
<li>
<i class="bx bx-block" id="websiteBlocking"></i>
<a href="#">Website Blocking</a>
<a href="website_blocking.html">Website Blocking</a>
</li>
<li>
<i class="bx bx-time-five" id="pomodoro"></i>
<a href="#">Pomodoro</a>
<a href="pomodoro.html">Pomodoro</a>
</li>
<li>
<i class="bx bx-edit" id="todoList"></i>
<a href="#">To-Do List</a>
<a href="todo_list.html">To-Do List</a>
</li>
<li>
<i class="bx bx-signal-5" id="progress"></i>
<a href="#">Progress Tracking</a>
<a href="performance.html">Progress Tracking</a>
</li>
</ul>
</div>
Expand Down
10 changes: 5 additions & 5 deletions Focus Mate/HTML/todo_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
<ul>
<li>
<i class="bx bxs-home" id="home"></i>
<a href="#">Home</a>
<a href="popup.html">Home</a>
</li>
<li>
<i class="bx bx-laptop" id="workingSession"></i>
<a href="#">Working Session</a>
<a href="working_session.html">Working Session</a>
</li>
<li>
<i class="bx bx-block" id="websiteBlocking"></i>
<a href="#">Website Blocking</a>
<a href="website_blocking.html">Website Blocking</a>
</li>
<li>
<i class="bx bx-time-five" id="pomodoro"></i>
<a href="#">Pomodoro</a>
<a href="pomodoro.html">Pomodoro</a>
</li>
<li class="active">
<i class="bx bx-edit" id="todoList"></i>
<a href="#">To-Do List</a>
<a href="todo_list.html">To-Do List</a>
</li>
<li>
<i class="bx bx-signal-5" id="progress"></i>
Expand Down
10 changes: 5 additions & 5 deletions Focus Mate/HTML/website_blocking.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
<ul>
<li>
<i class="bx bxs-home" id="home"></i>
<a href="#">Home</a>
<a href="popup.html">Home</a>
</li>
<li>
<i class="bx bx-laptop" id="laptop"></i>
<a href="#">Working Session</a>
<a href="working_session.html">Working Session</a>
</li>
<li class="active">
<i class="bx bx-block"></i>
<a href="#">Website Blocking</a>
<a href="website_blocking.html">Website Blocking</a>
</li>
<li>
<i class="bx bx-time-five"></i>
<a href="#">Pomodoro</a>
<a href="pomodoro.html">Pomodoro</a>
</li>
<li>
<i class="bx bx-edit"></i>
<a href="#">To-Do List</a>
<a href="todo_list.html">To-Do List</a>
</li>
<li>
<i class="bx bx-signal-5"></i>
Expand Down
40 changes: 40 additions & 0 deletions Focus Mate/JS/pomodoro.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,43 @@ document.getElementById("stop-btn").addEventListener("click", stopTimer);
document.getElementById("reset-btn").addEventListener("click", resetTimer);
document.getElementById("buttonTypePomodoro").addEventListener("click", () => setPomodoroType(TIMER_TYPE_POMODORO));
document.getElementById("buttonTypeShortBreak").addEventListener("click", () => setPomodoroType(TIMER_TYPE_SHORT_BREAK));
const home = document.querySelector("#home");
home.addEventListener("click", function (event) {
event.preventDefault();
window.location.href = "../HTML/popup.html";
});


/* Pomodoro */
const pomodoro = document.querySelector("#pomodoro");
pomodoro.addEventListener("click", function (event) {
try{
event.preventDefault();
window.location.href = "../HTML/pomodoro.html";
}catch(error){
console.log('error', error);
}

});

const todoListIcon = document.querySelector("#todoList");
todoListIcon.addEventListener("click", function (event) {
event.preventDefault();
window.location.href = "../HTML/todo_list.html";
});


const performance = document.querySelector("#progress");
performance.addEventListener("click", function(event){
event.preventDefault();
window.location.href = "../HTML/performance.html";
});









41 changes: 41 additions & 0 deletions Focus Mate/JS/todo_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,47 @@ function showTask(){

showTask();

const home = document.querySelector("#home");
home.addEventListener("click", function (event) {
event.preventDefault();
window.location.href = "../HTML/popup.html";
});


/* Pomodoro */
const pomodoro = document.querySelector("#pomodoro");
pomodoro.addEventListener("click", function (event) {
try{
event.preventDefault();
window.location.href = "../HTML/pomodoro.html";
}catch(error){
console.log('error', error);
}

});

const todolistIcon = document.querySelector("#todoList");
todolistIcon.addEventListener("click", function (event) {
event.preventDefault();
window.location.href = "../HTML/todo_list.html";
});


const performance = document.querySelector("#progress");
performance.addEventListener("click", function(event){
event.preventDefault();
window.location.href = "../HTML/performance.html";
});











// Calculate the total number of tasks added and completed (replace with actual data)
const totalTasksAdded = totalTasks; //localStorage.getItem("totalTasksAdded") || 0;
Expand Down
11 changes: 11 additions & 0 deletions Football Live Score/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"manifest_version": 2,
"name": "Football Live Score Tracker",
"description": "Track live football scores right from your browser!",
"version": "1.0.0",
"permissions": ["storage", "activeTab"],
"browser_action": {
"default_popup": "popup.html"
}
}

23 changes: 23 additions & 0 deletions Football Live Score/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live Football Scores Extension</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 class="mt-4 mb-4">Live Football Scores</h1>
<div id="scores-container"></div>
</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

<script src="script.js"></script>
</body>
</html>
48 changes: 48 additions & 0 deletions Football Live Score/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
document.addEventListener('DOMContentLoaded', function () {
const apiUrl = 'https://api.soccersapi.com/v2.2/livescores/?user=gabaniyash847&token=7e4a5c820e72104fc7362a33473d7f69&t=today';
const scoresContainer = document.getElementById('scores-container');

function fetchLiveScores() {
fetch(apiUrl)
.then(response => response.json())
.then(data => {
console.log(data);
scoresContainer.innerHTML = '';

data.data.forEach(match => {
const matchElement = document.createElement('div');
matchElement.classList.add('match');

const homeTeam = document.createElement('div');
homeTeam.classList.add('team');
homeTeam.innerHTML = `<img src="${match.teams.home.img}" alt="${match.teams.home.name}"> ${match.teams.home.name}`;

const awayTeam = document.createElement('div');
awayTeam.classList.add('team');
awayTeam.innerHTML = `<img src="${match.teams.away.img}" alt="${match.teams.away.name}"> ${match.teams.away.name}`;

const score = document.createElement('div');
score.innerHTML = `<strong>${match.scores.home_score} - ${match.scores.away_score}</strong>`;

const matchDetails = document.createElement('div');
matchDetails.classList.add('score-details');
matchDetails.innerHTML = `
<p>Status: ${match.status_name}</p>
<p>Date: ${match.time.date}</p>
<p>Time: ${match.time.time}</p>
`;

matchElement.appendChild(homeTeam);
matchElement.appendChild(score);
matchElement.appendChild(awayTeam);
matchElement.appendChild(matchDetails);

scoresContainer.appendChild(matchElement);
});
})
.catch(error => console.log('Error fetching live scores:', error));
}

fetchLiveScores();
setInterval(fetchLiveScores, 30000);
});
23 changes: 23 additions & 0 deletions Football Live Score/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
body {
font-family: Arial, sans-serif;
}
.match {
margin-bottom: 20px;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
width: 250px;
}
.team {
display: flex;
align-items: center;
}
.team img {
width: 30px;
height: 30px;
margin-right: 10px;
}
.score-details {
margin-top: 5px;
color: #666;
}

0 comments on commit ff1807e

Please sign in to comment.