diff --git a/public/js/render.js b/public/js/render.js index cf05022..ddf0861 100644 --- a/public/js/render.js +++ b/public/js/render.js @@ -60,10 +60,9 @@ page.doRenderSwal = function () { page.getRenderVersion = function () { const renderScript = document.getElementById('renderScript') - if (!renderScript) return '' - const match = renderScript.src.match(/\?v=\w*$/) - if (!match) return '' - return match[0] + if (renderScript && renderScript.dataset.version) + return `?v=${renderScript.dataset.version}` + return '' } page.doRender = function () { diff --git a/views/_globals.njk b/views/_globals.njk index 5c30f82..b775d98 100644 --- a/views/_globals.njk +++ b/views/_globals.njk @@ -14,10 +14,12 @@ v1: CSS and JS files (lolisafe). v2: Images and config files (manifest.json, browserconfig.xml, etc). v3: CSS and JS files (libs such as bulma, lazyload, etc). + v4: Renders in /public/render/* directories (to be used by render.js). #} -{% set v1 = "kz2IMxLx9c" %} +{% set v1 = "dLp5zKKIkN" %} {% set v2 = "hiboQUzAzp" %} {% set v3 = "hiboQUzAzp" %} +{% set v4 = "dLp5zKKIkN" %} {# These will be the links in the homepage and the No-JS uploader. diff --git a/views/home.njk b/views/home.njk index 7cbde05..0128a1d 100644 --- a/views/home.njk +++ b/views/home.njk @@ -23,8 +23,8 @@ - - + + {% endblock %} {% block content %}