sbbs/tools/frame_get.js

46 lines
882 B
JavaScript
Raw Normal View History

2024-12-03 10:36:03 +00:00
load('ansitex/load/page.js');
load('ansitex/load/funcs.js');
load('lz-string.js');
if ((argv.length > 2) || (argv.length < 1)) {
writeln('ERROR: Need a frame ID and type');
2024-12-03 10:36:03 +00:00
exit(1);
} else {
writeln('Showing frame:'+argv[0]);
2024-12-03 10:36:03 +00:00
}
var SESSION_EXT;
switch (argv[1]) {
case 'TEX':
case 'tex':
SESSION_EXT = 'tex';
load('ansitex/load/session/ansitex.js');
break;
case 'VTX':
case 'vtx':
default:
load('ansitex/load/session/viewdata.js');
SESSION_EXT = 'vtx';
break;
}
2024-12-03 10:36:03 +00:00
var p = new Page();
var po = new PageObject(argv[0]);
if (p.get(po)) {
writeln('Page : '+p.name);
writeln('- Cost : '+p.cost);
writeln('- Owner : '+p.owner);
writeln('- Key : '+p.key);
writeln('- Type : '+p.type);
writeln('- CUG : '+p.cug);
writeln('- isPublic: '+p.isPublic);
writeln('- isAccess: '+p.accessible);
} else {
writeln('Failed to load:'+argv[0]);
}