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 -->
|
||||
|
||||
`;
|
||||
// unreleased for now
|
||||
if (fs.existsSync(__dirname + "/WTVGuide.js")) {
|
||||
data += `
|
||||
<!-- BEGIN SPAN -->
|
||||
<tr>
|
||||
@@ -194,7 +192,7 @@ if (fs.existsSync(__dirname + "/WTVGuide.js")) {
|
||||
<td abswidth=7>
|
||||
<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>
|
||||
<td>
|
||||
<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>
|
||||
</table>
|
||||
<!-- END SPAN -->
|
||||
`;
|
||||
} else {
|
||||
data += `
|
||||
<tr>
|
||||
<td absheight=30>
|
||||
`;
|
||||
}
|
||||
|
||||
data += `
|
||||
|
||||
|
||||
<!-- ADJUST ME FOR HOME TEXT HEIGHT -->
|
||||
<tr>
|
||||
|
||||
@@ -37,8 +37,8 @@ class WTVGuide {
|
||||
|
||||
switch (topic.toLowerCase()) {
|
||||
case "glossary":
|
||||
var template = ServiceDeps+ "/wtv-guide/templates/glossary.js";
|
||||
var glossary_datafile = ServiceDeps+ "/wtv-guide/glossary.json";
|
||||
var template = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/templates/glossary.js");
|
||||
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(glossary_datafile)) break;
|
||||
|
||||
@@ -123,7 +123,7 @@ class WTVGuide {
|
||||
}
|
||||
} else {
|
||||
// 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;
|
||||
if (this.session_data.hasCap("client-has-tv-experience")) isPlusBox = true;
|
||||
var worddb = [];
|
||||
@@ -146,8 +146,9 @@ class WTVGuide {
|
||||
case "index":
|
||||
switch (subtopic.toLowerCase()) {
|
||||
case "glossary":
|
||||
var template = ServiceDeps+ "/wtv-guide/templates/glossary_index.js";
|
||||
var glossary_datafile = ServiceDeps+ "/wtv-guide/glossary.json";
|
||||
var template = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/templates/glossary_index.js");
|
||||
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(glossary_datafile)) break;
|
||||
|
||||
@@ -166,9 +167,9 @@ class WTVGuide {
|
||||
// fallback to old js file method
|
||||
try {
|
||||
var prerendered = null;
|
||||
if (!page) prerendered = ServiceDeps+ "/wtv-guide/prerendered/" + topic + "/" + subtopic + ".js";
|
||||
else prerendered = ServiceDeps+ "/wtv-guide/prerendered/" + topic + "/" + subtopic + "/" + page + ".js";
|
||||
console.log(prerendered)
|
||||
if (!page) prerendered = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/prerendered/" + topic + "/" + subtopic + ".js");
|
||||
else prerendered = this.wtvshared.getAbsolutePath(this.minisrv_config.config.ServiceDeps + "/wtv-guide/prerendered/" + topic + "/" + subtopic + "/" + page + ".js");
|
||||
|
||||
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.
|
||||
// Furthermore, only modifications to variables in `updateFromVM` will be saved.
|
||||
// Example: an attempt to change "minisrv_config" from a ServiceVault script would be discarded
|
||||
var WTVGuide = null;
|
||||
if (fs.existsSync(__dirname + "/WTVGuide.js")) WTVGuide = require("./WTVGuide.js");
|
||||
var WTVGuide = require("./WTVGuide.js");
|
||||
var WTVBGMusic = require("./WTVBGMusic.js");
|
||||
var WTVDownloadList = require("./WTVDownloadList.js");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user