From e2b4b8a7f895d691fc273ef56cffda48a18e9f0a Mon Sep 17 00:00:00 2001 From: Stephan Kristyn Date: Tue, 10 Feb 2026 14:36:03 +0100 Subject: [PATCH] Adding new DOM element, CSS and JS code --- css/common.css | 6 ++++++ js/privatebin.js | 4 +++- lib/Configuration.php | 2 +- tpl/bootstrap5.php | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/css/common.css b/css/common.css index b5019c47..a46483b1 100644 --- a/css/common.css +++ b/css/common.css @@ -26,6 +26,12 @@ margin-bottom: 20px; } +#attachmentInfo { + color: #666; + font-size: 0.9em; + margin-left: 0.25em; +} + #dropzone { text-align: center; position: fixed; diff --git a/js/privatebin.js b/js/privatebin.js index a32084e2..533a5a1e 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2995,7 +2995,9 @@ jQuery.PrivateBin = (function($) { attachmentLink.attr('download', fileName); const fileSize = Helper.formatBytes(decodedData.length); - const fileInfo = document.createTextNode(` (${fileName}, ${fileSize})`); + const fileInfo = document.createElement('span'); + fileInfo.id = 'attachmentInfo'; + fileInfo.textContent = ` (${fileName}, ${fileSize})`; template[0].appendChild(fileInfo); } diff --git a/lib/Configuration.php b/lib/Configuration.php index ae647e7d..28bbc284 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -122,7 +122,7 @@ class Configuration 'js/kjua-0.10.0.js' => 'sha512-BYj4xggowR7QD150VLSTRlzH62YPfhpIM+b/1EUEr7RQpdWAGKulxWnOvjFx1FUlba4m6ihpNYuQab51H6XlYg==', 'js/legacy.js' => 'sha512-RQEo1hxpNc37i+jz/D9/JiAZhG8GFx3+SNxjYnI7jUgirDIqrCSj6QPAAZeaidditcWzsJ3jxfEj5lVm7ZwTRQ==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-Iocquz/9jEXqfZzJP03eR8Km4tMelTrl9JkRs4+zuvUJ1ABl8qoqkRnaftcoqE3sJHTncnnlOwAsL3brzH05gA==', + 'js/privatebin.js' => 'sha512-h+pxj+EYo9SEt65HLl1lFThdF05atKK3xaWBqGBWxERpllH5JZOsSWSM+V5vk/hj20HPQewsPgtrhBDv54uMIQ==', 'js/purify-3.3.0.js' => 'sha512-lsHD5zxs4lu/NDzaaibe27Vd2t7Cy9JQ3qDHUvDfb4oZvKoWDNEhwUY+4bT3R68cGgpgCYp8U1x2ifeVxqurdQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', 'js/zlib-1.3.1-2.js' => 'sha512-4gT+v+BkBqdVBbKOO4qKGOAzuay+v1FmOLksS+bMgQ08Oo4xEb3X48Xq1Kv2b4HtiCQA7xq9dFRzxal7jmQI7w==', diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 47b1fcec..06547e1a 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -550,6 +550,7 @@ endif;