Skip to content

Commit

Permalink
fixed a timing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu authored and Edsu committed Feb 10, 2017
1 parent 1640a04 commit 9561eb6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app.js
Expand Up @@ -67,9 +67,7 @@ app.get('/commons-image/:page', function (req, res){
path: path
};
http.get(opts, function (response) {
//res.header('Content-Type', 'application/json');
response.on('data', function (chunk) {
res.setHeader('Cache-Control', 'public, max-age=1000')
res.write(chunk);
});
response.on('end', function () {
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js
Expand Up @@ -37,7 +37,7 @@ function init() {
}

function getNumUpdates() {
var panelHeight = $(window).height() - $('#updatePanel').offset().top - 40;
var panelHeight = $(window).height() - $('#updatePanel').offset().top + 50;
$('#updatePanel').height(panelHeight);
numUpdates = Math.floor(panelHeight / 25);
console.log('keep track of ' + numUpdates + ' updates');
Expand Down

0 comments on commit 9561eb6

Please sign in to comment.