diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index a4c3efa0..f569d4b9 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -169,8 +169,10 @@ function getAceFile(callback) { var request = require('request'); var baseURI = 'http://localhost:' + settings.port + var resourceURI = baseURI + path.normalize(path.join('/static/', filename)); + resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?) - request(baseURI + path.normalize(path.join('/static/', filename)), function (error, response, body) { + request(resourceURI, function (error, response, body) { if (!error && response.statusCode == 200) { data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = ' + JSON.stringify(body || '') + ';\n'; diff --git a/src/node/utils/caching_middleware.js b/src/node/utils/caching_middleware.js index 61be733a..b8b7e1f1 100644 --- a/src/node/utils/caching_middleware.js +++ b/src/node/utils/caching_middleware.js @@ -85,7 +85,7 @@ CachingMiddleware.prototype = new function () { && new Date(res.getHeader('last-modified'))); res.writeHead = old_res.writeHead; - if (status == 200 || status == 404) { + if (status == 200) { // Update cache var buffer = ''; diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js index 0bdc2cab..2b67ac73 100644 --- a/src/static/js/broadcast_slider.js +++ b/src/static/js/broadcast_slider.js @@ -22,6 +22,8 @@ // These parameters were global, now they are injected. A reference to the // Timeslider controller would probably be more appropriate. +var forEach = require('./ace2_common').forEach; + function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) { var BroadcastSlider; @@ -173,7 +175,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) $("#authorstable").empty(); var numAnonymous = 0; var numNamed = 0; - authors.forEach(function(author) + forEach(authors, function(author) { if (author.name) { @@ -467,7 +469,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded) $("#timeslider").show(); setSliderLength(clientVars.totalRevs); setSliderPosition(clientVars.revNum); - clientVars.savedRevisions.forEach(function(revision) + forEach(clientVars.savedRevisions, function(revision) { addSavedRevision(revision.revNum, revision); })