mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 01:06:16 -04:00
Use reduce to find smallest and largest inputNums.
Tab shadows are now displayed using css classes
This commit is contained in:
parent
b3fa1eaae2
commit
30a66f1441
3 changed files with 24 additions and 27 deletions
|
@ -251,23 +251,16 @@ class TabWaiter {
|
|||
tabsList.appendChild(this.createTabElement(nums[i], active, io));
|
||||
}
|
||||
|
||||
const firstTab = tabsList.firstElementChild,
|
||||
lastTab = tabsList.lastElementChild;
|
||||
|
||||
// Display shadows if there are tabs left / right of the displayed tabs
|
||||
if (firstTab) {
|
||||
if (tabsLeft) {
|
||||
firstTab.style.boxShadow = "15px 0px 15px -15px var(--primary-border-colour) inset";
|
||||
} else {
|
||||
firstTab.style.boxShadow = "";
|
||||
}
|
||||
if (tabsLeft) {
|
||||
tabsList.classList.add("tabs-left");
|
||||
} else {
|
||||
tabsList.classList.remove("tabs-left");
|
||||
}
|
||||
if (lastTab) {
|
||||
if (tabsRight) {
|
||||
lastTab.style.boxShadow = "-15px 0px 15px -15px var(--primary-border-colour) inset";
|
||||
} else {
|
||||
lastTab.style.boxShadow = "";
|
||||
}
|
||||
if (tabsRight) {
|
||||
tabsList.classList.add("tabs-right");
|
||||
} else {
|
||||
tabsList.classList.remove("tabs-right");
|
||||
}
|
||||
|
||||
// Show or hide the tab bar depending on how many tabs we have
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue