From 5654ef2db8e322296d9861ea77a08668a293129b Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Fri, 23 May 2025 13:37:38 +0300 Subject: [PATCH 1/2] Hide Reply button in the discussions once clicked to avoid losing the text input --- CHANGELOG.md | 1 + js/privatebin.js | 6 ++++++ lib/Configuration.php | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d8bff0f..6bd47610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * CHANGED: Passing large data structures by reference to reduce memory consumption (#858) * CHANGED: Removed use of ctype functions and polyfill library for ctype * CHANGED: Upgrading libraries to: DOMpurify 3.2.5, ip-lib 1.20.0 +* FIXED: Hide Reply button in the discussions once clicked to avoid losing the text input (#1508) ## 1.7.6 (2025-02-01) * ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390 & #12) diff --git a/js/privatebin.js b/js/privatebin.js index 4d05c8df..77d47968 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -3477,6 +3477,12 @@ jQuery.PrivateBin = (function($, RawDeflate) { { const $source = $(event.target); + // show all reply buttons + $commentContainer.find('button').removeClass('hidden'); + + // hide the current reply button + $source.addClass('hidden'); + // clear input $replyMessage.val(''); $replyNickname.val(''); diff --git a/lib/Configuration.php b/lib/Configuration.php index daa05d7c..ce1f650e 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -119,7 +119,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-yN0ZaVFrXpiYaeFRcofdCrlHVcw4ZJAXU3K1l6H9rsoY//iLKegX0GdWxRCFWzhd1xO4eDJKCT7qyaA1Vt65bg==', + 'js/privatebin.js' => 'sha512-o6rDfwUaOdNm2jB+Vom14fyNRgs32frpTU5E+KnLo0BOhF5Syh1JNAC7+UgUL9gOHIFMtDGPHSHcGP79PKlVOg==', 'js/purify-3.2.5.js' => 'sha512-eLlLLL/zYuf5JuG0x4WQm687MToqOGP9cDQHIdmOy1ZpjiY4J48BBcOM7DtZheKk1UogW920+9RslWYB4KGuuA==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', From 6dac586f4172158c673dda1c2ec4b366df9ad58e Mon Sep 17 00:00:00 2001 From: Ribas160 Date: Sat, 24 May 2025 12:35:59 +0300 Subject: [PATCH 2/2] Fix the duplicated message box in comments --- js/privatebin.js | 1 + lib/Configuration.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index 77d47968..439afefd 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -5416,6 +5416,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.run = function(paste) { Alert.hideMessages(); + Alert.setCustomHandler(null); Alert.showLoading('Decrypting paste…', 'cloud-download'); if (typeof paste === 'undefined' || paste.type === 'click') { diff --git a/lib/Configuration.php b/lib/Configuration.php index ce1f650e..f78f3ae5 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -119,7 +119,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-o6rDfwUaOdNm2jB+Vom14fyNRgs32frpTU5E+KnLo0BOhF5Syh1JNAC7+UgUL9gOHIFMtDGPHSHcGP79PKlVOg==', + 'js/privatebin.js' => 'sha512-QkOUM8rg4MI60YRwHqWmayBzCdf/e3XnbHtrX17h2nn0EcyOQNhtSq8a0dXR1hoQFHFfF+9PiT73nZ6qoogjQA==', 'js/purify-3.2.5.js' => 'sha512-eLlLLL/zYuf5JuG0x4WQm687MToqOGP9cDQHIdmOy1ZpjiY4J48BBcOM7DtZheKk1UogW920+9RslWYB4KGuuA==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',