welp guide wasn't supposed to be pushed yet but since it was might as well fix it a bit
This commit is contained in:
@@ -181,8 +181,6 @@ data = `<HTML>
|
|||||||
<!-- END SPAN -->
|
<!-- END SPAN -->
|
||||||
|
|
||||||
`;
|
`;
|
||||||
// unreleased for now
|
|
||||||
if (fs.existsSync(__dirname + "/WTVGuide.js")) {
|
|
||||||
data += `
|
data += `
|
||||||
<!-- BEGIN SPAN -->
|
<!-- BEGIN SPAN -->
|
||||||
<tr>
|
<tr>
|
||||||
@@ -194,7 +192,7 @@ if (fs.existsSync(__dirname + "/WTVGuide.js")) {
|
|||||||
<td abswidth=7>
|
<td abswidth=7>
|
||||||
<td abswidth=125>
|
<td abswidth=125>
|
||||||
|
|
||||||
<table cellspacing=0 cellpadding=0 href="wtv-guide:/help?topic=Index&subtopic=Main&page=1">
|
<table cellspacing=0 cellpadding=0 href="wtv-guide:/help?topic=Index&subtopic=Glossary">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table cellspacing=0 cellpadding=0>
|
<table cellspacing=0 cellpadding=0>
|
||||||
@@ -222,16 +220,6 @@ if (fs.existsSync(__dirname + "/WTVGuide.js")) {
|
|||||||
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
|
<img src="file://rom/Images/Spacer.gif" width=1 height=1>
|
||||||
</table>
|
</table>
|
||||||
<!-- END SPAN -->
|
<!-- END SPAN -->
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
data += `
|
|
||||||
<tr>
|
|
||||||
<td absheight=30>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
data += `
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ADJUST ME FOR HOME TEXT HEIGHT -->
|
<!-- ADJUST ME FOR HOME TEXT HEIGHT -->
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ class WTVGuide {
|
|||||||
|
|
||||||
switch (topic.toLowerCase()) {
|
switch (topic.toLowerCase()) {
|
||||||
case "glossary":
|
case "glossary":
|
||||||
var template = ServiceDeps+ "/wtv-guide/templates/glossary.js";
|
var template = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/templates/glossary.js");
|
||||||
var glossary_datafile = ServiceDeps+ "/wtv-guide/glossary.json";
|
var glossary_datafile = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/glossary.json");
|
||||||
if (!this.fs.existsSync(template)) break;
|
if (!this.fs.existsSync(template)) break;
|
||||||
if (!this.fs.existsSync(glossary_datafile)) break;
|
if (!this.fs.existsSync(glossary_datafile)) break;
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ class WTVGuide {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// glossary letter word index
|
// glossary letter word index
|
||||||
var template = ServiceDeps+ "/wtv-guide/templates/glossary_word_index.js";
|
var template = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/templates/glossary_word_index.js");
|
||||||
var isPlusBox = false;
|
var isPlusBox = false;
|
||||||
if (this.session_data.hasCap("client-has-tv-experience")) isPlusBox = true;
|
if (this.session_data.hasCap("client-has-tv-experience")) isPlusBox = true;
|
||||||
var worddb = [];
|
var worddb = [];
|
||||||
@@ -146,8 +146,9 @@ class WTVGuide {
|
|||||||
case "index":
|
case "index":
|
||||||
switch (subtopic.toLowerCase()) {
|
switch (subtopic.toLowerCase()) {
|
||||||
case "glossary":
|
case "glossary":
|
||||||
var template = ServiceDeps+ "/wtv-guide/templates/glossary_index.js";
|
var template = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/templates/glossary_index.js");
|
||||||
var glossary_datafile = ServiceDeps+ "/wtv-guide/glossary.json";
|
console.log(template);
|
||||||
|
var glossary_datafile = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/glossary.json");
|
||||||
if (!this.fs.existsSync(template)) break;
|
if (!this.fs.existsSync(template)) break;
|
||||||
if (!this.fs.existsSync(glossary_datafile)) break;
|
if (!this.fs.existsSync(glossary_datafile)) break;
|
||||||
|
|
||||||
@@ -166,9 +167,9 @@ class WTVGuide {
|
|||||||
// fallback to old js file method
|
// fallback to old js file method
|
||||||
try {
|
try {
|
||||||
var prerendered = null;
|
var prerendered = null;
|
||||||
if (!page) prerendered = ServiceDeps+ "/wtv-guide/prerendered/" + topic + "/" + subtopic + ".js";
|
if (!page) prerendered = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/prerendered/" + topic + "/" + subtopic + ".js");
|
||||||
else prerendered = ServiceDeps+ "/wtv-guide/prerendered/" + topic + "/" + subtopic + "/" + page + ".js";
|
else prerendered = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/prerendered/" + topic + "/" + subtopic + "/" + page + ".js");
|
||||||
console.log(prerendered)
|
|
||||||
if (!this.fs.existsSync(prerendered)) break;
|
if (!this.fs.existsSync(prerendered)) break;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
|
|||||||
// The ServiceVault scripts will only be allowed to access the following fcnutions/variables.
|
// The ServiceVault scripts will only be allowed to access the following fcnutions/variables.
|
||||||
// Furthermore, only modifications to variables in `updateFromVM` will be saved.
|
// Furthermore, only modifications to variables in `updateFromVM` will be saved.
|
||||||
// Example: an attempt to change "minisrv_config" from a ServiceVault script would be discarded
|
// Example: an attempt to change "minisrv_config" from a ServiceVault script would be discarded
|
||||||
var WTVGuide = null;
|
var WTVGuide = require("./WTVGuide.js");
|
||||||
if (fs.existsSync(__dirname + "/WTVGuide.js")) WTVGuide = require("./WTVGuide.js");
|
|
||||||
var WTVBGMusic = require("./WTVBGMusic.js");
|
var WTVBGMusic = require("./WTVBGMusic.js");
|
||||||
var WTVDownloadList = require("./WTVDownloadList.js");
|
var WTVDownloadList = require("./WTVDownloadList.js");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user