diff --git a/assets/js/message-permalink.js b/assets/js/message-permalink.js index b17d584ad7..97f7f637ea 100644 --- a/assets/js/message-permalink.js +++ b/assets/js/message-permalink.js @@ -1,11 +1,11 @@ (function() { 'use strict' - $('.topic-message').on('click', "[data-ajax-input='copy-hyperlink']", function(e) { + $('.topic-message').on('click', '[data-copy-permalink]', function(e) { e.stopPropagation() e.preventDefault() - navigator.clipboard.writeText($(this).attr("data-message-url")); - const dropdown = e.target.closest(".dropdown") + navigator.clipboard.writeText($(this).attr('data-copy-permalink')) + const dropdown = e.target.closest('.dropdown') dropdown.removeAttribute('open') }) })(jQuery) diff --git a/templates/misc/message.part.html b/templates/misc/message.part.html index 17a4412356..b0acc680a0 100644 --- a/templates/misc/message.part.html +++ b/templates/misc/message.part.html @@ -144,12 +144,11 @@ {% if not is_mp %}