forked from avi/signalelsewhere
Fix dead code removal, isolate panel close handlers, polish
This commit is contained in:
10
index.html
10
index.html
@@ -657,11 +657,6 @@ function cmdChoose(arg){
|
||||
}
|
||||
|
||||
// ── ENDING ──
|
||||
function cmdChooseConfirmed(){
|
||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||
triggerEnding(G.faction);
|
||||
}
|
||||
|
||||
function cmdMake(arg){
|
||||
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||
@@ -857,9 +852,8 @@ function startSpectrum(){
|
||||
specAnimId=requestAnimationFrame(drawSpec);
|
||||
}
|
||||
drawSpec();
|
||||
document.querySelectorAll('.panel-close').forEach(b=>{
|
||||
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();};
|
||||
});
|
||||
const specClose = document.querySelector('#specPanel .panel-close');
|
||||
if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
|
||||
}
|
||||
|
||||
// ── FACILITY MAP ──
|
||||
|
||||
@@ -657,11 +657,6 @@ function cmdChoose(arg){
|
||||
}
|
||||
|
||||
// ── ENDING ──
|
||||
function cmdChooseConfirmed(){
|
||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||
triggerEnding(G.faction);
|
||||
}
|
||||
|
||||
function cmdMake(arg){
|
||||
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||
@@ -857,9 +852,8 @@ function startSpectrum(){
|
||||
specAnimId=requestAnimationFrame(drawSpec);
|
||||
}
|
||||
drawSpec();
|
||||
document.querySelectorAll('.panel-close').forEach(b=>{
|
||||
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();};
|
||||
});
|
||||
const specClose = document.querySelector('#specPanel .panel-close');
|
||||
if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
|
||||
}
|
||||
|
||||
// ── FACILITY MAP ──
|
||||
|
||||
Reference in New Issue
Block a user