first commit
This commit is contained in:
16
script.js
Normal file
16
script.js
Normal file
@@ -0,0 +1,16 @@
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
const themeToggle = document.getElementById('themeToggle');
|
||||
const printBtn = document.getElementById('printBtn');
|
||||
|
||||
if(themeToggle){
|
||||
themeToggle.addEventListener('click', ()=>{
|
||||
document.body.classList.toggle('dark');
|
||||
});
|
||||
}
|
||||
|
||||
if(printBtn){
|
||||
printBtn.addEventListener('click', ()=>{
|
||||
window.print();
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user