forked from GitHub/virtualtabletop
added serverName
to config (#1832)
This commit is contained in:
parent
be78e3b05a
commit
02fd09c1da
@ -552,12 +552,7 @@ onLoad(function() {
|
||||
if(!checkedOnce)
|
||||
checkURLproperties(true);
|
||||
checkedOnce = true;
|
||||
let tabSuffix;
|
||||
if (config.customTab) {
|
||||
tabSuffix = config.customTab;
|
||||
} else {
|
||||
tabSuffix = "VirtualTabletop.io"
|
||||
}
|
||||
let tabSuffix = config.customTab || config.serverName || 'VirtualTabletop.io';
|
||||
document.title = `${document.location.pathname.split('/').pop()} - ${tabSuffix}`;
|
||||
});
|
||||
});
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>VirtualTabletop.io</title>
|
||||
<title> /*** TITLE ***/ </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="icon" sizes="any" href="i/branding/favicon-32.png"/>
|
||||
<link rel="icon" type="image/svg+xml" href="i/branding/favicon.svg"/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"serverName": "VirtualTabletop.io",
|
||||
"port": 8272,
|
||||
"externalURL": "http://localhost:8272",
|
||||
"urlPrefix": "",
|
||||
|
@ -161,6 +161,7 @@ async function compressJS(jsFiles) {
|
||||
|
||||
async function compress(htmlFile, cssFiles, jsFiles) {
|
||||
let htmlString = fs.readFileSync(path.resolve() + '/' + htmlFile, {encoding:'utf8'});
|
||||
htmlString = htmlString.replace(/\ \/\*\*\*\ TITLE\ \*\*\*\/\ /, _=>Config.get('serverName'));
|
||||
|
||||
const css = await compressCSS(cssFiles);
|
||||
htmlString = htmlString.replace(/\ \/\*\*\*\ CSS\ \*\*\*\/\ /, _=>css).replace(/\ \/\/\*\*\*\ CONFIG\ \*\*\*\/\/\ /, _=>`const config = ${JSON.stringify(Config.config)};`);
|
||||
|
Loading…
Reference in New Issue
Block a user