edit txt files. keyboard shortcut for share tools
This commit is contained in:
@@ -219,6 +219,21 @@ tr:nth-child(odd) {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.edit_form {
|
||||
display: inline-block;
|
||||
}
|
||||
.edit_form_submit {
|
||||
display: inline-block;
|
||||
margin-left: 1em;
|
||||
background-color: inherit;
|
||||
border: none;
|
||||
color: var(--text-color);
|
||||
text-align: center;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* index */
|
||||
|
||||
#index_title {
|
||||
|
||||
@@ -15,6 +15,7 @@ function index_form_enter(event) {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function index_form_submit() {
|
||||
window.location = window.location + "/list/" +
|
||||
document.getElementById("index_form_name").value;
|
||||
@@ -29,7 +30,9 @@ function infoToggle() {
|
||||
|
||||
function scriptToggle() {
|
||||
var el = document.getElementById("list_script");
|
||||
el.style.display = el.style.display === 'block' ? 'none' : 'block';
|
||||
if (el) {
|
||||
el.style.display = el.style.display === 'block' ? 'none' : 'block';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +107,7 @@ function FileSelectHandler(e) {
|
||||
// Variable to stop parallel uploads
|
||||
var uploadTurn = -1;
|
||||
|
||||
|
||||
function UploadURL() {
|
||||
var URL = document.getElementById("list_url_upload_text").value;
|
||||
var xhr = new XMLHttpRequest();
|
||||
@@ -150,3 +154,20 @@ function UploadURL() {
|
||||
function changeTitle(newTitle) {
|
||||
document.title = "Flees - " + newTitle;
|
||||
}
|
||||
|
||||
function back() {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
function keyboardEntry(ev){
|
||||
var kC=ev.keyCode;
|
||||
var k=String.fromCharCode(ev.keyCode);
|
||||
if ( document.activeElement === document.getElementById("list_url_upload_text")) {
|
||||
return
|
||||
}
|
||||
if (/T/.test(k)) {
|
||||
infoToggle();
|
||||
}
|
||||
}
|
||||
|
||||
document.onkeyup = keyboardEntry;
|
||||
|
||||
Reference in New Issue
Block a user