From 9f8b9e3da9695e42f1c3abd21e47f176e2ee9420 Mon Sep 17 00:00:00 2001 From: Ankit Matth <146843890+Ankit-Matth@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:32:15 +0530 Subject: [PATCH] fixing minor things for deployment using GitHub Pages --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 81d12a9..5c6de64 100644 --- a/main.js +++ b/main.js @@ -16,8 +16,8 @@ function checkOverflow() { moreBtns.addEventListener('click', () => { - if (moreBtns.firstElementChild.getAttribute('src') === "/images/moreBtns.png") { - moreBtns.firstElementChild.setAttribute("src", "/images/simpleCalc.png") + if (moreBtns.firstElementChild.getAttribute('src') === "images/moreBtns.png") { + moreBtns.firstElementChild.setAttribute("src", "images/simpleCalc.png") let arrTop = Array.from(document.getElementsByClassName('simpleCalcTopBtns')) let arrBtns = Array.from(document.getElementsByClassName('simpleCalcBtns')) arrTop.forEach(element => { @@ -30,7 +30,7 @@ moreBtns.addEventListener('click', () => { del.parentElement.style.lineHeight = "0.5rem" ansDisplay.focus() } else { - moreBtns.firstElementChild.setAttribute("src", "/images/moreBtns.png") + moreBtns.firstElementChild.setAttribute("src", "images/moreBtns.png") let arrTop = Array.from(document.getElementsByClassName('topBtns')) let arrBtns = Array.from(document.getElementsByClassName('smallBtns')) arrBtns.forEach(element => { @@ -397,4 +397,4 @@ function closeModal() { const info = document.getElementById('info'); info.addEventListener('click', function () { openModal(); -}); \ No newline at end of file +});