Commit bd44b077 authored by Daniel Edgecumbe's avatar Daniel Edgecumbe

Fix tab wrapping on hotkey; JS wat

parent a15e9911
Pipeline #290 passed with stages
in 27 seconds
......@@ -763,6 +763,10 @@ onload = function() {
rawAsyncRequest(`${THIS_URL}/_git_status`, dealWithGitStatus);
rawAsyncRequest(`${THIS_URL}/AUTHORS.md`, dealWithAuthorsMd);
let mod = function(a, b) {
return ((a % b) + b) % b;
}
document.onkeydown = function(e) {
if ((e.key == "ArrowDown") || (e.key === "ArrowUp")) {
let i;
......@@ -778,7 +782,7 @@ onload = function() {
i--;
}
i = i % TABS.length;
i = mod(i, TABS.length);
app.tab = TABS[i][0];
e.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment