diff options
Diffstat (limited to 'p/scripts/main.js')
| -rw-r--r-- | p/scripts/main.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 1a3b02c2a..f8d20a622 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -946,7 +946,7 @@ function init_stream(stream) { return true; } - el = ev.target.closest('.item.share > a[href="#"]'); + el = ev.target.closest('.item.share > a[data-type="print"]'); if (el) { //Print const tmp_window = window.open(); for (var i = 0; i < document.styleSheets.length; i++) { @@ -960,6 +960,12 @@ function init_stream(stream) { return false; } + el = ev.target.closest('.item.share > a[data-type="clipboard"]'); + if (el && navigator.clipboard) { //Clipboard + navigator.clipboard.writeText(el.href); + return false; + } + el = ev.target.closest('.item.share > a[href="POST"]'); if (el) { //Share by POST const f = el.parentElement.querySelector('form'); |
