diff --git a/www/checkup/dependency-warning.js b/www/checkup/dependency-warning.js new file mode 100644 index 000000000..0b11fcf1e --- /dev/null +++ b/www/checkup/dependency-warning.js @@ -0,0 +1,17 @@ +(function () { + var first = true; + window.addEventListener('error', function (ev) { + if (!ev) { return; } + var srcElement = ev.srcElement; + if (!srcElement) { return; } + var nodeName = srcElement.nodeName; + if (nodeName !== 'SCRIPT') { return; } + var src = srcElement.src; + if (!/\/bower_components\/.*/.test(src)) { return; } + if (first) { + document.write(`

It's possible that this server's administrators forgot to install its client-side dependencies with 'bower update'.

`); + first = false; + } + document.write(`

Failed to load ${src}.

`); + }, true); +}()); diff --git a/www/checkup/index.html b/www/checkup/index.html index 04a9502d3..9015d10f2 100644 --- a/www/checkup/index.html +++ b/www/checkup/index.html @@ -3,6 +3,7 @@ +