Working on rewrite version 3. Focus on caching and opening after download.

This commit is contained in:
Scott Idem
2022-03-08 18:30:49 -05:00
parent 1d7c14dedb
commit 552be26831
7 changed files with 357 additions and 49 deletions

View File

@@ -158,9 +158,9 @@ function format_bytes(bytes, decimals = 2) {
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
function shorten_filename(filename) {
function shorten_filename(filename, max_length=45) {
let length = filename.length;
let char_over = filename.length-45;
let char_over = filename.length-max_length;
let new_filename = null;
let wildcards = char_over;
if (char_over > 0) {