diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-18 23:50:06 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-18 23:50:06 +0200 |
commit | ecd983a83f753195688461856c5fd6437d8f53e7 (patch) | |
tree | 3dcffca84a73d3e46f19a24cfaca2456a3ff91de /loggedin.js | |
parent | 7fe813121b2e6d95ad6e86eeaf12ed58dc2ff729 (diff) | |
download | fileup-ecd983a83f753195688461856c5fd6437d8f53e7.tar.gz |
URL Actions, part 1 of N
Diffstat (limited to 'loggedin.js')
-rw-r--r-- | loggedin.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/loggedin.js b/loggedin.js index 8d9e92f..4f81f34 100644 --- a/loggedin.js +++ b/loggedin.js @@ -949,6 +949,8 @@ function add_file_visuals(fileview) { open_file = fileview; openfile(fileview.is_directory); }], + + ]; if (is_in_trash) { @@ -961,6 +963,18 @@ function add_file_visuals(fileview) { ['Rename', () => { rename_file(fileview.filename); }], ); if (!fileview.is_directory) { + for (let a of actions) { + if (fileview.filename.endsWith(a.extension)) { + context_list.push( + [a.text, () => { + read_file_contents(false, (x) => { + alert (encodeURIComponent(x)); + }, get_path(), fileview.filename); + }] + ); + } + } + if (fileview.write_permissions) { context_list.push( ['Replace', () => { replace_file(false, fileview.filename); }], |