updates to stop it breaking with an empty table

This commit is contained in:
Martin Donnelly 2016-02-24 15:45:23 +00:00
parent d652921534
commit d9ea9cab16
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,7 @@ buttons {
transition: margin-left 0.2s; transition: margin-left 0.2s;
} }
@media (min-width: 768px) { @media (min-width: 600px) {
#header { #header {
left: 200px; left: 200px;
} }

View File

@ -28,6 +28,7 @@ function createDB() {
fs.openSync(dbfile, 'w'); fs.openSync(dbfile, 'w');
db = new sqlite3.Database(dbfile, createTable); db = new sqlite3.Database(dbfile, createTable);
db.close(); db.close();
connectDB();
} }
else { else {
logger.info('Database already created.'); logger.info('Database already created.');
@ -118,7 +119,7 @@ function genericGrab(url) {
logger.debug(tdihbody.length); logger.debug(tdihbody.length);
tdihbody = cleaner(tdihbody); tdihbody = cleaner(tdihbody);
logger.debug(title); logger.debug(title);
// fs.writeFileSync(htmlfile, tdihbody.html()); fs.writeFileSync(htmlfile, tdihbody.html());
obj.push(url); obj.push(url);
obj.push($.html()); obj.push($.html());
obj.push(tdihbody.html()); obj.push(tdihbody.html());