Project Update

This commit is contained in:
2021-05-03 22:35:31 +02:00
parent 3b9757ebeb
commit eadff755a0
16 changed files with 2902 additions and 2108 deletions

View File

@@ -119,6 +119,22 @@ if (isset($_GET["feature"])) {
font-family: monospace;
}
*::-webkit-scrollbar-track {
border-radius: 8px;
background-color: #353535;
}
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
*::-webkit-scrollbar-thumb {
border-radius: 8px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #bcbcbc;
}
#shell {
background: #222;
max-width: 800px;
@@ -146,7 +162,8 @@ if (isset($_GET["feature"])) {
@media (max-width: 991px) {
#shell-logo {
display: none;
font-size: 6px;
margin: -25px 0;
}
html, body, #shell {
@@ -166,6 +183,12 @@ if (isset($_GET["feature"])) {
}
}
@media (max-width: 320px) {
#shell-logo {
font-size: 5px;
}
}
.shell-prompt {
font-weight: bold;
color: #75DF0B;
@@ -231,6 +254,10 @@ if (isset($_GET["feature"])) {
eShellContent.scrollTop = eShellContent.scrollHeight;
}
function _defer(callback) {
setTimeout(callback, 0);
}
function featureShell(command) {
_insertCommand(command);
@@ -372,8 +399,10 @@ if (isset($_GET["feature"])) {
if (historyPosition > 0) {
historyPosition--;
eShellCmdInput.blur();
eShellCmdInput.focus();
eShellCmdInput.value = commandHistory[historyPosition];
_defer(function() {
eShellCmdInput.focus();
});
}
break;
case "ArrowDown":
@@ -427,6 +456,20 @@ if (isset($_GET["feature"])) {
xhr.send(getQueryString());
}
document.onclick = function(event) {
event = event || window.event;
var selection = window.getSelection();
var target = event.target || event.srcElement;
if (target.tagName === "SELECT") {
return;
}
if (!selection.toString()) {
eShellCmdInput.focus();
}
};
window.onload = function() {
eShellCmdInput = document.getElementById("shell-cmd");
eShellContent = document.getElementById("shell-content");