diff --git a/.gitignore b/.gitignore index cc21637..d272e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules/ dist/ nextStatic/ publicDirs/ -extraModules/ +src/extraModules/ +duplicateRemovingLog/ src/extraModules - +/*.sh diff --git a/scripts/serverStats.js b/scripts/serverStats.js index 3a580eb..589fa6f 100644 --- a/scripts/serverStats.js +++ b/scripts/serverStats.js @@ -28,6 +28,8 @@ const coloredWords = { 'allqr', 'possibleAnswers', 'irc', + 'faq', + '/script' ], blue: ['isadding', 'ask'], magenta: [ @@ -158,7 +160,9 @@ function countLinesMatching(text, toMatch) { } function readFile(name) { - return fs.readFileSync(name, 'utf8') + if (fs.existsSync(name)) { + return fs.readFileSync(name, 'utf8') + } } function getLetterNTimes(letter, number) { @@ -379,9 +383,9 @@ function printLastDataCount(data) { } // ------------------------------------------------------------------------------ printHeader('Daily script install / update check count') -const todaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex()}`) -const yesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-1)}`) -const beforeYesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-2)}`) +const todaysLogs = readFile(`${dir}stats/vlogs/log`) +const yesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-1)}`) || '' +const beforeYesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-2)}`) || '' const installs = [ [ diff --git a/src/modules/stuff/stuff.ts b/src/modules/stuff/stuff.ts index ea25136..19c7efe 100644 --- a/src/modules/stuff/stuff.ts +++ b/src/modules/stuff/stuff.ts @@ -84,7 +84,7 @@ function GetApp(): ModuleType { const fpath = listedFiles + fp if (!fs.existsSync(fpath)) { res.render('nofile', { - missingFile: fpath, + missingFile: fp, url, }) return @@ -222,7 +222,7 @@ function GetApp(): ModuleType { } } catch (err) { res.render('nofile', { - missingFile: curr, + missingFile: relPath, url, }) } diff --git a/src/server.ts b/src/server.ts index 07a32d9..e04ae2a 100755 --- a/src/server.ts +++ b/src/server.ts @@ -44,7 +44,7 @@ import utils from './utils/utils' import dbtools from './utils/dbtools' import reqlogger from './middlewares/reqlogger.middleware' import idStats from './utils/ids' -const extraModulesFile = '.src/extraModules/extraModules.json' +const extraModulesFile = './data/extraModules.json' const statExcludeFile = './data/statExclude.json' const modulesFile = './src/modules.json' const usersDBPath = './data/dbs/users.db' diff --git a/src/sharedViews/login.ejs b/src/sharedViews/login.ejs index e45b8f1..7bc058d 100644 --- a/src/sharedViews/login.ejs +++ b/src/sharedViews/login.ejs @@ -43,20 +43,16 @@ clear: both; padding-bottom: 23px; } - .showpwContainer { - color: white; - width: 40px; - cursor: pointer; - } input[type=text], input[type=password], textarea { font-size: 16px; color: white; background-color: #181a1b; - width: 20%; + width: 300px;; padding: 12px 20px; margin: 8px 0; box-sizing: border-box; border: 2px solid white; + text-align: center; } input[type=text]:focus, input[type=password]:focus, textarea:focus, input[type=text]:hover, input[type=password]:hover, textarea:hover { border: 2px solid #F2CB05; @@ -85,25 +81,6 @@ .disabledButton { background-color: #a38c1a; } - .ircLinkContainer { - display: flex; - justify-content: flex-end - } - .ircLink { - color: #9999ff; - font-size: 12px; - text-decoration: underline; - cursor: pointer; - } - #feedback { - display: none; - } - #feedbackTextArea { - text-align: left; - font-size: 16px; - height: 160px; - resize: none; - }