mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
fixed lintting issue
This commit is contained in:
parent
6cc0d05e78
commit
0fa8be7dd0
2 changed files with 13 additions and 14 deletions
|
@ -78,7 +78,7 @@
|
||||||
border-left: 2px solid var(--primary-border-colour);
|
border-left: 2px solid var(--primary-border-colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
p a:focus{
|
p a:focus {
|
||||||
color: #0a6ebd;
|
color: #0a6ebd;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,6 @@ class ControlsWaiter {
|
||||||
|
|
||||||
for (let i = 0; i < tabs.length; i++) {
|
for (let i = 0; i < tabs.length; i++) {
|
||||||
tabs[i].addEventListener("keydown", this.changeTabs, false);
|
tabs[i].addEventListener("keydown", this.changeTabs, false);
|
||||||
// tabs[i].addEventListener("keydown", this.navigateFAQList, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const reportBugInfo = document.getElementById("report-bug-info");
|
const reportBugInfo = document.getElementById("report-bug-info");
|
||||||
|
@ -406,36 +405,36 @@ ${navigator.userAgent}
|
||||||
}
|
}
|
||||||
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-1")) {
|
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-1")) {
|
||||||
document.getElementById("faqs").querySelector("[class='btn btn-primary']").focus();
|
document.getElementById("faqs").querySelector("[class='btn btn-primary']").focus();
|
||||||
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-2")) {
|
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-2")) {
|
||||||
document.getElementById("report-bug").querySelector("[class='btn btn-primary']").focus();
|
document.getElementById("report-bug").querySelector("[class='btn btn-primary']").focus();
|
||||||
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-3")) {
|
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-3")) {
|
||||||
document.getElementById("about").querySelector("[href]").focus();
|
document.getElementById("about").querySelector("[href]").focus();
|
||||||
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-4")) {
|
} else if (ev.key === "Tab" && !ev.shiftKey && ev.target === document.getElementById("tab-4")) {
|
||||||
const button = document.getElementById("support-modal").getElementsByClassName("modal-footer");
|
const button = document.getElementById("support-modal").getElementsByClassName("modal-footer");
|
||||||
const close = button[0].firstElementChild;
|
const close = button[0].firstElementChild;
|
||||||
close.focus();
|
close.focus();
|
||||||
} else if (ev.key === "Enter" || ev.key === "Space" ||ev.key === " ") {
|
} else if (ev.key === "Enter" || ev.key === "Space" || ev.key === " ") {
|
||||||
tab.click();
|
tab.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Event} ev
|
* @param {Event} ev
|
||||||
*/
|
*/
|
||||||
navigateFAQList(ev) {
|
navigateFAQList(ev) {
|
||||||
|
|
||||||
const el = ev.target.nextElementSibling;
|
const el = ev.target.nextElementSibling;
|
||||||
if (ev.key === "Enter" || ev.key === "Space"|| ev.key === " "){
|
if (ev.key === "Enter" || ev.key === "Space" || ev.key === " ") {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const question = el.classList;
|
const question = el.classList;
|
||||||
if(question !== undefined && question.value){
|
if (question !== undefined && question.value) {
|
||||||
if (!question.value.includes("show")) {
|
if (!question.value.includes("show")) {
|
||||||
question.add("show");
|
question.add("show");
|
||||||
} else if (question.contains("show")) {
|
} else if (question.contains("show")) {
|
||||||
question.remove("show");
|
question.remove("show");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue