From 31a5922cf6ed2b544cef40b431cd80e05aa143c2 Mon Sep 17 00:00:00 2001 From: "Max W." Date: Sat, 12 Apr 2025 01:20:53 +0200 Subject: [PATCH] Add privacy policy --- {public => static}/index.css | 0 {public => static}/index.html | 68 +++++++++++++++++++++++++++++++++++ {public => static}/index.js | 10 ++++++ 3 files changed, 78 insertions(+) rename {public => static}/index.css (100%) rename {public => static}/index.html (58%) rename {public => static}/index.js (95%) diff --git a/public/index.css b/static/index.css similarity index 100% rename from public/index.css rename to static/index.css diff --git a/public/index.html b/static/index.html similarity index 58% rename from public/index.html rename to static/index.html index 50d7608..aa7e919 100644 --- a/public/index.html +++ b/static/index.html @@ -13,7 +13,11 @@ + + + + @@ -75,7 +79,71 @@ + + + \ No newline at end of file diff --git a/public/index.js b/static/index.js similarity index 95% rename from public/index.js rename to static/index.js index fb4d882..0215ea6 100644 --- a/public/index.js +++ b/static/index.js @@ -1,4 +1,13 @@ $(document).ready(function() { + + // init privacy policy modal + $('.footer p:nth-child(2)').html('All pastes are publicly accessible via the generated URL. View the Privacy Policy for more information.'); + $('#privacy-link').click(function(e) { + e.preventDefault(); + var privacyModal = new bootstrap.Modal(document.getElementById('privacyPolicyModal')); + privacyModal.show(); + }); + // DOM Elements const $editor = $('#editor'); const $viewer = $('#viewer'); @@ -224,6 +233,7 @@ $(document).ready(function() { window.history.pushState({}, '', `/?id=${data.id}#${$languageSelector.val()}`); // Switch to viewer mode + $('pre').css('width', '100%'); // Set pre width $editorContainer.addClass('viewer-active'); } else { showNotification(`Error: ${data.error}`, 'error');