Update browser.js

Signed-off-by: ed <s@ocv.me>
This commit is contained in:
ed 2026-01-23 00:04:56 +00:00 committed by GitHub
parent 153239a99e
commit d0652264f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5570,7 +5570,6 @@ var thegrid = (function () {
var ths = QSA('#ggrid>a');
for (var a = 0, aa = ths.length; a < aa; a++) {
if(ths[a].id == 'temp') continue;
var tr = ebi(ths[a].getAttribute('ref')).closest('tr'),
cl = tr.className || '';
@ -9515,25 +9514,20 @@ var rcm = (function () {
var selFile = jcp(nsFile);
function mktemp(is_dir) {
if(!thegrid.en) {
var row = mknod('tr', 'temp',
'<td>-new-</td>' +
'<td colspan="' + (QSA("#files thead th").length - 1) + '"><input id="tempname" class="i" type="text" placeholder="' + (is_dir ? 'Folder' : "File") + ' Name"></td>'
);
qsr('#rcm_tmp');
if (!thegrid.en) {
var row = mknod('tr', 'rcm_tmp',
'<td>-new-</td><td colspan="' + (QSA("#files thead th").length - 1) + '"><input id="tempname" class="i" type="text" placeholder="' + (is_dir ? 'Folder' : 'File') + ' Name"></td>');
QS("#files tbody").appendChild(row);
}
else{
var row = mknod('a', 'temp',
'<span class="dir" style="align-self: end;"><input id="tempname" class="dir" type="text" placeholder="' + (is_dir ? 'Folder' : "File") + ' Name"></span>'
);
// TODO: using some inline theming here. not good?
if(is_dir) {
row.className = 'dir'; // add folder icon
}
row.style = "display: flex;"; // lets us align text entry box to the bottom
else {
var row = mknod('a', 'rcm_tmp',
'<span class="dir" style="align-self:end"><input id="tempname" class="dir" type="text" placeholder="' + (is_dir ? 'Folder' : 'File') + ' Name"></span>');
if (is_dir)
row.className = 'dir';
row.style.display = 'flex';
QS("#ggrid").appendChild(row);
}
function sendit(name) {
name = ('' + name).trim();
@ -9567,7 +9561,7 @@ var rcm = (function () {
sendit(input.value);
if (e.key == "Enter" || e.key == "Escape") {
input.onblur = null;
row.remove();
row.remove();
ev(e);
}
};