diff --git a/.gitignore b/.gitignore index 12d133e..f10dd42 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ public/history/*.json .well-known/ settings.json +customHtmlAfterFooter.html diff --git a/customHtmlAfterFooter.example.html b/customHtmlAfterFooter.example.html new file mode 100644 index 0000000..75c8355 --- /dev/null +++ b/customHtmlAfterFooter.example.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/templates/Templater.js b/templates/Templater.js index 0848551..ac581f1 100644 --- a/templates/Templater.js +++ b/templates/Templater.js @@ -26,6 +26,11 @@ module.exports = class { .replace(/\{\{allowedFormats\}\}/g, settings.allowedFormats.join(',')) .replace(/\{\{maxFileSize\}\}/g, (settings.maxFileSize > 0 ? settings.maxFileSize + 'MB' : 'no')); + if (fs.existsSync(path.resolve('./customHtmlAfterFooter.html'))) { + const customHtmlAfterFooter = fs.readFileSync(path.resolve('./customHtmlAfterFooter.html')); + filledTemplate = filledTemplate.replace(/\{\{customHtmlAfterFooter\}\}/g, customHtmlAfterFooter); + } + for (let templateVar in templateVars) { const regExp = new RegExp('\{\{' + templateVar + '\}\}', 'g') filledTemplate = filledTemplate.replace(regExp, templateVars[templateVar]); diff --git a/templates/htmlContainer.html b/templates/htmlContainer.html index 1d9d09c..0c36eef 100644 --- a/templates/htmlContainer.html +++ b/templates/htmlContainer.html @@ -86,6 +86,8 @@ {{modal}} + + {{customHtmlAfterFooter}} \ No newline at end of file