Skip to content
Snippets Groups Projects
Commit 2a594094 authored by echicken's avatar echicken :chicken:
Browse files

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

parent 113a9a56
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -218,14 +218,10 @@ function getPage(page) { ...@@ -218,14 +218,10 @@ function getPage(page) {
switch(ext) { switch(ext) {
case '.SSJS': case '.SSJS':
if (ext === '.SSJS' && p.search(/\.xjs\.ssjs$/i) >= 0) break; if (ext === '.SSJS' && p.search(/\.xjs\.ssjs$/i) >= 0) break;
(function () { js.exec(p, new function () {});
load(p, true);
})();
break; break;
case '.XJS': case '.XJS':
(function () { js.exec(xjs_compile(p), new function () {});
load(xjs_compile(p), true);
})();
break; break;
case '.HTML': case '.HTML':
var f = new File(p); var f = new File(p);
......
...@@ -52,14 +52,10 @@ function getSidebarModule(module) { ...@@ -52,14 +52,10 @@ function getSidebarModule(module) {
switch (ext) { switch (ext) {
case '.SSJS': case '.SSJS':
if (ext === '.SSJS' && module.search(/\.xjs\.ssjs$/i) >= 0) break; if (ext === '.SSJS' && module.search(/\.xjs\.ssjs$/i) >= 0) break;
(function () { js.exec(module, new function () {});
load(module, true);
})();
break; break;
case '.XJS': case '.XJS':
(function () { js.exec(xjs_compile(module), new function () {});
load(xjs_compile(module), true);
})();
break; break;
case '.HTML': case '.HTML':
ret = getFileContents(module); ret = getFileContents(module);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment