-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript-features.js
More file actions
24 lines (23 loc) · 902 Bytes
/
Copy pathscript-features.js
File metadata and controls
24 lines (23 loc) · 902 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
document.addEventListener("DOMContentLoaded",()=>{
x = screen.availWidth*(0.90);
y = screen.availHeight*(0.72);
rad = screen.availHeight*(0.09);
colors = ["yellow","red","blue","green"];
lefts = [0,x,x,0]
tops = [0,0,y,y]
i = 0;
function load_page(name){
window.location = `${name}.html`;
}
document.querySelectorAll(".navigate").forEach(button =>
{
button.setAttribute('style',`opacity :0.4; font-size: ${rad/3}px; font-family: "Times New Roman", Times, serif;position: fixed; top:${tops[i]}px; left: ${lefts[i]}px;width :${2*rad}px; height: ${2*rad}px; background: ${colors[i]}; border-radius :${rad}px`)
i++;
const name = button.id;
button.onclick = () =>
{
//console.log(`Clicked on ${name}.html`);
load_page(name);
}
});
});