Skip to content
Snippets Groups Projects
Commit 15db552d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Since viewable file types support wildcards now, just use '*'

This installs as the last viewable file type, so it just becomes a
fall-through for all file extensions/types and attempts to view them
using the Archive class.
parent 10b758ff
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -108,33 +108,16 @@ function list(filename, verbose) ...@@ -108,33 +108,16 @@ function list(filename, verbose)
function install() function install()
{ {
var viewable_exts = [
'7z',
'exe',
'bz',
'gz',
'iso',
'lha',
'lzh',
'tbz',
'tgz',
'rar',
'xar',
'zip'
];
var cnflib = load({}, "cnflib.js"); var cnflib = load({}, "cnflib.js");
var file_cnf = cnflib.read("file.cnf"); var file_cnf = cnflib.read("file.cnf");
if(!file_cnf) { if(!file_cnf) {
alert("Failed to read file.cnf"); alert("Failed to read file.cnf");
exit(-1); exit(-1);
} }
for(var e in viewable_exts) { file_cnf.fview.push({
file_cnf.fview.push({ extension: "*",
extension: viewable_exts[e], cmd: '?archive list %f'
cmd: '?archive list %f' });
});
}
if(!cnflib.write("file.cnf", undefined, file_cnf)) { if(!cnflib.write("file.cnf", undefined, file_cnf)) {
alert("Failed to write file.cnf"); alert("Failed to write file.cnf");
exit(-1); exit(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment