diff --git a/.vscode/settings.json b/.vscode/settings.json index ee123cf5a..9614e1bb3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,7 @@ "ansible/playbooks/*/*": true, "archive/*": true, "logs/*": true, + "static/*": true, "media/fonts": true, "static/*.css": true, "static/*.js": true, diff --git a/docker/nginx/nginx.consul.conf.j2 b/docker/nginx/nginx.consul.conf.j2 index 3995022bb..c3d1170f5 100644 --- a/docker/nginx/nginx.consul.conf.j2 +++ b/docker/nginx/nginx.consul.conf.j2 @@ -61,6 +61,7 @@ server { } location /static/ { + gzip_static on; expires max; keepalive_timeout 1; root /srv/newsblur; diff --git a/docker/nginx/nginx.local.conf b/docker/nginx/nginx.local.conf index 7f797ed91..41f917e35 100644 --- a/docker/nginx/nginx.local.conf +++ b/docker/nginx/nginx.local.conf @@ -64,6 +64,7 @@ server { } location /static/ { + gzip_static on; expires max; keepalive_timeout 1; root /srv/newsblur; diff --git a/media/js/vendor/audio.js b/media/js/vendor/audio.js index aeeefcdbe..98392f129 100755 --- a/media/js/vendor/audio.js +++ b/media/js/vendor/audio.js @@ -7,20 +7,27 @@ scripts = document.getElementsByTagName('script'); for (var i = 0, ii = scripts.length; i < ii; i++) { var path = scripts[i].getAttribute('src'); - if(re.test(path)) return path.replace(re, ''); + if(re.test(path)) + { + var f = path.split ( '/' ); + f.pop (); + return f.join ( '/' ) + '/'; + } } + // when no script found, an empty string causes the least confusion. + return ''; })(); - + // ##The audiojs interface // This is the global object which provides an interface for creating new `audiojs` instances. // It also stores all of the construction helper methods and variables. container[audiojs] = { instanceCount: 0, instances: {}, - // The markup for the swf. It is injected into the page if there is not support for the `