From b71f383122f0089ffa97e8f2f5167cc884feaae7 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Fri, 26 Nov 2021 16:44:11 -0500 Subject: [PATCH] Fixing remaining broken js files. Collect static command now works as expected. --- .vscode/settings.json | 1 + docker/nginx/nginx.consul.conf.j2 | 1 + docker/nginx/nginx.local.conf | 1 + media/js/vendor/audio.js | 106 ++-- media/js/vendor/il.js | 497 ++++++++++++++++++ ...sLoaded-4.1.0.js => imagesLoaded-4.1.4.js} | 74 +-- media/js/vendor/jquery.newsblur.js | 16 - newsblur_web/assets.yml | 2 +- newsblur_web/settings.py | 2 +- 9 files changed, 607 insertions(+), 93 deletions(-) create mode 100644 media/js/vendor/il.js rename media/js/vendor/{imagesLoaded-4.1.0.js => imagesLoaded-4.1.4.js} (89%) 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 `