-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
102 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta charset="utf-8" /> | ||
<title>GitHub Prime</title> | ||
|
||
<!-- ============= CSS ============= --> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" | ||
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" /> | ||
<link rel="stylesheet" href="./main.css" /> | ||
|
||
<!-- ============= JS ============= --> | ||
<script src="./main.js"></script> | ||
</head> | ||
|
||
<body class="w-96 rounded-lg shadow-lg"> | ||
<header class="flex w-full bg-prime-light p-4 text-gray-800 select-none"> | ||
<img src="../images/icon-48.png" alt="GitHub Prime Logo" class="w-8 h-8" /> | ||
<h1 class="ml-2 text-xl font-bold"> | ||
<a href="https://GitHubPrime.com" target="_blank" rel="noopener">GitHub Prime</a> | ||
</h1> | ||
</header> | ||
|
||
<main class="text-gray-800 text-sm p-4"> | ||
<div class="flex flex-col space-y-4"> | ||
<div class="flex items-center justify-between"> | ||
<label for="showCommitDetails">Show commit details button</label> | ||
<label class="switch"> | ||
<input type="checkbox" id="showCommitDetails" data-question="showCommitDetails" /> | ||
<span class="slider round"></span> | ||
</label> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
<footer class="flex flex-col items-center justify-center w-full p-4 bg-prime-light text-gray-800 select-none"> | ||
<div class="flex space-x-2 mt-2"> | ||
<a href="https://GitHubPrime.com" title="GitHub Prime Website" target="_blank" rel="noopener"> | ||
<i class="fas fa-home"></i> | ||
</a> | ||
<a href="https://github.com/amastaneh/github-prime" title="GitHub Prime Repository" target="_blank" rel="noopener"> | ||
<i class="fab fa-github"></i> | ||
</a> | ||
<a href="https://twitter.com/github-prime" title="GitHub Prime Twitter" target="_blank" rel="noopener"> | ||
<i class="fab fa-twitter"></i> | ||
</a> | ||
<small class="text-xs">© 2024 <a href="https://GitHubPrime.com">GitHub Prime</a> ver 1.0.31</small> | ||
</div> | ||
</footer> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Function to initialize switches based on localStorage | ||
function initializeSwitches() { | ||
const switches = document.querySelectorAll('.switch input'); | ||
|
||
switches.forEach((sw) => { | ||
const question = sw.getAttribute('data-question'); | ||
const storedValue = localStorage.getItem(question); | ||
|
||
if (storedValue === null) { | ||
// Default value is true | ||
localStorage.setItem(question, 'true'); | ||
sw.checked = true; | ||
} else { | ||
sw.checked = storedValue === 'true'; | ||
} | ||
|
||
// Add event listener to update localStorage on change | ||
sw.addEventListener('change', (event) => { | ||
localStorage.setItem(question, event.target.checked); | ||
}); | ||
}); | ||
} | ||
|
||
// Call the initialize function on page load | ||
document.addEventListener('DOMContentLoaded', initializeSwitches); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.