-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (21 loc) · 929 Bytes
/
Copy pathscript.js
File metadata and controls
25 lines (21 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let body=document.body;
let toolButtons=document.querySelectorAll(".tool button");
//hanlding button click events for all the tools
toolButtons.forEach(button=>{
button.addEventListener("click",(e)=>{
let title=e.target.parentElement.querySelector("h2").innerText;
if(title==="Image Resizer"){
window.location.href = "./tools/image_Resizer/imgResizer.html";
}else if(title==="Image Converter"){
window.location.href = "./tools/image_converter/imageCoverter.html";
}else if(title==="Image Compressor"){
window.location.href = "./tools/image_compressor/imageCompressor.html";
}else if(title==="Merge PDF"){
window.location.href = "./tools/MergePdf/mergepdf.html";
}else if(title==="Split PDF"){
window.location.href = "./tools/SplitPdf/splitPdf.html";
}else if(title==="PDF Watermark"){
window.location.href = "./tools/watermarkAdder/pdfWaterMark.html";
}
})
})