Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 2a594094 authored by echicken's avatar echicken 🐔

Run XJS/SSJS pages & sidebar modules via js.exec.

parent 113a9a56
......@@ -218,14 +218,10 @@ function getPage(page) {
switch(ext) {
case '.SSJS':
if (ext === '.SSJS' && p.search(/\.xjs\.ssjs$/i) >= 0) break;
(function () {
load(p, true);
})();
js.exec(p, new function () {});
break;
case '.XJS':
(function () {
load(xjs_compile(p), true);
})();
js.exec(xjs_compile(p), new function () {});
break;
case '.HTML':
var f = new File(p);
......
......@@ -52,14 +52,10 @@ function getSidebarModule(module) {
switch (ext) {
case '.SSJS':
if (ext === '.SSJS' && module.search(/\.xjs\.ssjs$/i) >= 0) break;
(function () {
load(module, true);
})();
js.exec(module, new function () {});
break;
case '.XJS':
(function () {
load(xjs_compile(module), true);
})();
js.exec(xjs_compile(module), new function () {});
break;
case '.HTML':
ret = getFileContents(module);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment