font replacements
This commit is contained in:
parent
30587e0317
commit
2b56853761
9 changed files with 28 additions and 33 deletions
|
@ -30,8 +30,6 @@
|
|||
</button>
|
||||
|
||||
<button class="reset" id="reset">Reset</button>
|
||||
|
||||
<button class="button" id="font-button">Enable Funny Font</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ const help = document.getElementById('help');
|
|||
const container = document.getElementById('container');
|
||||
const seperator = document.getElementById('seperator');
|
||||
const counterMain = document.getElementById('key-counters');
|
||||
const fontButton = document.getElementById('font-button');
|
||||
|
||||
let isLightMode = false;
|
||||
|
||||
|
@ -41,35 +40,10 @@ document.addEventListener("keydown", (e) => {
|
|||
logKey(e.key);
|
||||
});
|
||||
|
||||
|
||||
|
||||
help.addEventListener('click', function () {
|
||||
alert('Press any key to see how many times it was pressed.')
|
||||
});
|
||||
|
||||
let isFunnyFont = false;
|
||||
fontButton.addEventListener('click', function() {
|
||||
if (!isFunnyFont) {
|
||||
document.querySelectorAll("*").forEach((e) => {
|
||||
e.style.fontFamily = "crueltysquad";
|
||||
});
|
||||
isFunnyFont = true;
|
||||
console.log(isFunnyFont);
|
||||
document.getElementById('font-button').innerHTML = "Disable Funny Font";
|
||||
|
||||
} else {
|
||||
document.querySelectorAll("*").forEach((e) => {
|
||||
e.style.fontFamily = "monospace";
|
||||
});
|
||||
isFunnyFont = false;
|
||||
console.log(isFunnyFont)
|
||||
document.getElementById('font-button').innerHTML = "Enable Funny Font";
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
themeToggle.addEventListener('click', function() {
|
||||
if (!isLightMode) {
|
||||
document.getElementById('navBar').style.backgroundColor = "rgba(200,200,200,0.775)";
|
||||
|
|
|
@ -17,7 +17,7 @@ body {
|
|||
transition: background-color 0.3s, color 0.3s;
|
||||
overflow-x: hidden;
|
||||
overflow-y: visible;
|
||||
font-family: 'JetBrainsMono', 'Hack', monospace;
|
||||
font-family: 'Hack', 'JetBrainsMono', monospace;
|
||||
}
|
||||
|
||||
* {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue