From 6c39a1441c72bd8ef4c45544d7903a093d4bef28 Mon Sep 17 00:00:00 2001 From: ribas160 Date: Sat, 28 Dec 2024 18:42:46 +0200 Subject: [PATCH 1/6] Copy paste to clipboard button added. Copy paste to clipboard shortcut added --- css/bootstrap/privatebin.css | 39 ++++++++++ css/bootstrap5/privatebin.css | 35 +++++++++ css/privatebin.css | 1 + i18n/ar.json | 4 +- i18n/bg.json | 4 +- i18n/ca.json | 4 +- i18n/co.json | 4 +- i18n/cs.json | 4 +- i18n/de.json | 4 +- i18n/el.json | 4 +- i18n/en.json | 4 +- i18n/es.json | 4 +- i18n/et.json | 4 +- i18n/fi.json | 4 +- i18n/fr.json | 4 +- i18n/he.json | 4 +- i18n/hi.json | 4 +- i18n/hu.json | 4 +- i18n/id.json | 4 +- i18n/it.json | 4 +- i18n/ja.json | 4 +- i18n/jbo.json | 4 +- i18n/ko.json | 4 +- i18n/ku.json | 4 +- i18n/la.json | 4 +- i18n/lt.json | 4 +- i18n/nl.json | 4 +- i18n/no.json | 4 +- i18n/oc.json | 4 +- i18n/pl.json | 4 +- i18n/pt.json | 4 +- i18n/ro.json | 4 +- i18n/ru.json | 4 +- i18n/sk.json | 4 +- i18n/sl.json | 4 +- i18n/sv.json | 4 +- i18n/th.json | 4 +- i18n/tr.json | 4 +- i18n/uk.json | 4 +- i18n/zh.json | 4 +- img/content-copy-icon.svg | 1 + js/privatebin.js | 138 ++++++++++++++++++++++++++++++++++ lib/Configuration.php | 2 +- tpl/bootstrap.php | 9 +++ tpl/bootstrap5.php | 5 ++ 45 files changed, 340 insertions(+), 38 deletions(-) create mode 100644 img/content-copy-icon.svg diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css index a7c0f188..7bb6d286 100644 --- a/css/bootstrap/privatebin.css +++ b/css/bootstrap/privatebin.css @@ -175,3 +175,42 @@ html[dir="rtl"] #language { html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose { float: left; } + +#prettyprint { + padding-right: 30px; +} + +#prettymessageCopyBtn { + position: absolute; + top: 5px; + right: 20px; + width: 25px; + height: 25px; + padding: 0; + background: none; + border: none; + z-index: 1; +} + +#prettymessageCopyBtn svg { + width: 100%; +} + +#copyIcon { + fill: rgb(145, 152, 161); + opacity: 0.4; + transition: all 0.3s ease; +} + +#copyIcon:hover { + opacity: 1; +} + +#copySuccessIcon { + fill: rgb(63, 185, 80); + display: none; +} + +#copyShortcutHint { + margin-bottom: 5px; +} \ No newline at end of file diff --git a/css/bootstrap5/privatebin.css b/css/bootstrap5/privatebin.css index b14768a1..1fa54d70 100644 --- a/css/bootstrap5/privatebin.css +++ b/css/bootstrap5/privatebin.css @@ -84,3 +84,38 @@ li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 { html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose { float: left; } + +#prettyprint { + padding-right: 30px; +} + +#prettymessageCopyBtn { + position: absolute; + top: 5px; + right: 5px; + width: 25px; + height: 25px; + padding: 0; + background: none; + border: none; + z-index: 1; +} + +#prettymessageCopyBtn svg { + width: 100%; +} + +#copyIcon { + fill: rgb(145, 152, 161); + opacity: 0.4; + transition: all 0.3s ease; +} + +#copyIcon:hover { + opacity: 1; +} + +#copySuccessIcon { + fill: rgb(63, 185, 80); + display: none; +} diff --git a/css/privatebin.css b/css/privatebin.css index 77824fb6..473875de 100644 --- a/css/privatebin.css +++ b/css/privatebin.css @@ -86,6 +86,7 @@ h3.title { #aboutbox a { color: #94a3b4; } #message, #cleartext, #prettymessage, #attachment, .replymessage { + position: relative; clear: both; color: #000; background-color: #fff; diff --git a/i18n/ar.json b/i18n/ar.json index 5fffac70..a82fdbe0 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -219,5 +219,7 @@ "Yes, see it": "نعم، حمله", "Dark Mode": "الوضع الداكن", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/bg.json b/i18n/bg.json index 44b669a2..2d076bbe 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ca.json b/i18n/ca.json index fca160e7..034f7846 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error de compressió de la nota, no hi ha suport de WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/co.json b/i18n/co.json index d59bdb22..905e41b1 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -219,5 +219,7 @@ "Yes, see it": "Iè, fighjallu", "Dark Mode": "Modu scuru", "Error compressing paste, due to missing WebAssembly support.": "Sbagliu durante a cumpressione di l’appiccicu, perchè WebAssembly ùn hè micca accettatu.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/cs.json b/i18n/cs.json index 5e4b88b2..37ef227a 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/de.json b/i18n/de.json index 8bc311bd..fbf9b864 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -219,5 +219,7 @@ "Yes, see it": "Ja, jetzt einsehen", "Dark Mode": "Nachtmodus", "Error compressing paste, due to missing WebAssembly support.": "Fehler beim Komprimieren des Textes, da WebAssembly-Unterstützung fehlt.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/el.json b/i18n/el.json index f1278fd5..2d46877d 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -219,5 +219,7 @@ "Yes, see it": "Ναι, δείτε το", "Dark Mode": "Σκοτεινό Θέμα", "Error compressing paste, due to missing WebAssembly support.": "Σφάλμα συμπίεσης επικόλλησης, λόγω έλλειψης υποστήριξης WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/en.json b/i18n/en.json index 64bc773f..ac296e1b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/es.json b/i18n/es.json index ea96caa9..63d221fd 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -219,5 +219,7 @@ "Yes, see it": "Sí, verlo", "Dark Mode": "Modo nocturno", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/et.json b/i18n/et.json index b58ece48..54b9d00f 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Tume režiim", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/fi.json b/i18n/fi.json index 3341555a..3c290ffa 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -219,5 +219,7 @@ "Yes, see it": "Kyllä, näet sen", "Dark Mode": "Tumma tila", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/fr.json b/i18n/fr.json index e4676f2e..21ae376d 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -219,5 +219,7 @@ "Yes, see it": "Oui, le voir", "Dark Mode": "Mode Sombre", "Error compressing paste, due to missing WebAssembly support.": "Erreur lors de la compression du paste, en raison du support de WebAssembly manquant.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/he.json b/i18n/he.json index 22a0af1b..bb506b7c 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/hi.json b/i18n/hi.json index 64bc773f..ac296e1b 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/hu.json b/i18n/hu.json index 3f232d97..93d2a13f 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Sötét mód", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/id.json b/i18n/id.json index e4387f95..4ba1baa2 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Mode Gelap", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/it.json b/i18n/it.json index d972a8c5..c0954486 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -219,5 +219,7 @@ "Yes, see it": "Sì, visualizzalo", "Dark Mode": "Tema Scuro", "Error compressing paste, due to missing WebAssembly support.": "Errore nella compressione dell messaggio, a causa del supporto WebAssembly mancante.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ja.json b/i18n/ja.json index 48f91a72..7084cda4 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -219,5 +219,7 @@ "Yes, see it": "はい、使用します", "Dark Mode": "ダークモード", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/jbo.json b/i18n/jbo.json index 7cce9584..37eda35a 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ko.json b/i18n/ko.json index 64bc773f..ac296e1b 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ku.json b/i18n/ku.json index 84d070a7..2e787916 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "جۆری ڕەش", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/la.json b/i18n/la.json index 45e9951c..5174379e 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/lt.json b/i18n/lt.json index 63aeb17f..acbff84e 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -219,5 +219,7 @@ "Yes, see it": "Taip, pamatyti", "Dark Mode": "Tamsi veiksena", "Error compressing paste, due to missing WebAssembly support.": "Klaida glaudinant įdėjimą, nes trūksta WebAssembly palaikymo.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/nl.json b/i18n/nl.json index 80efa6ad..8efefc27 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -219,5 +219,7 @@ "Yes, see it": "Ja, tonen", "Dark Mode": "Donkere modus", "Error compressing paste, due to missing WebAssembly support.": "Fout bij het comprimeren van notitie door ontbrekende ondersteuning voor WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/no.json b/i18n/no.json index f1850408..17911fde 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -219,5 +219,7 @@ "Yes, see it": "Ja, se det", "Dark Mode": "Mørk modus", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/oc.json b/i18n/oc.json index 3799d86c..97adbb63 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/pl.json b/i18n/pl.json index 51f38eed..181ddeef 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Ciemny motyw", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/pt.json b/i18n/pt.json index 34252572..7553fdb7 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -219,5 +219,7 @@ "Yes, see it": "Sim, veja", "Dark Mode": "Modo Noturno", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ro.json b/i18n/ro.json index 5d1d1b3b..698693f4 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -219,5 +219,7 @@ "Yes, see it": "Da, vezi", "Dark Mode": "Mod întunecat", "Error compressing paste, due to missing WebAssembly support.": "Eroare la compresia paste-ului din cauza incompatibilității cu WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ru.json b/i18n/ru.json index d7081105..c561a92a 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -219,5 +219,7 @@ "Yes, see it": "Да, загрузить", "Dark Mode": "Тёмная", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Запись скопирована в буфер обмена", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "Чтобы скопировать запись нажмите на кнопку скопирования или используйте комбинацию клавиш Ctrl+c/Cmd+c" } diff --git a/i18n/sk.json b/i18n/sk.json index 59390e13..972a40b5 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Tmavý Režim", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/sl.json b/i18n/sl.json index cb0f1e50..a56f79e5 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Temni način", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/sv.json b/i18n/sv.json index 0e24e37b..6e278f84 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Mörkt Läge", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/th.json b/i18n/th.json index c0aa6803..a1da0993 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -219,5 +219,7 @@ "Yes, see it": "Yes, see it", "Dark Mode": "โหมดมืด", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/tr.json b/i18n/tr.json index 49dcad49..cd98b08e 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -219,5 +219,7 @@ "Yes, see it": "Evet, görüyorum", "Dark Mode": "Koyu Mod", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/uk.json b/i18n/uk.json index cfb8c44e..a8ce1e3c 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -219,5 +219,7 @@ "Yes, see it": "Так, побачити", "Dark Mode": "Темний режим", "Error compressing paste, due to missing WebAssembly support.": "Помилка при стисканні допису, через відсутність підтримки WebAssembly сервера.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте інший браузер для перегляду цього допису." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте інший браузер для перегляду цього допису.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/zh.json b/i18n/zh.json index 80f081c5..07cb05e5 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -219,5 +219,7 @@ "Yes, see it": "是的,加载它", "Dark Mode": "暗黑模式", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Paste copied to clipboard": "Paste copied to clipboard", + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/img/content-copy-icon.svg b/img/content-copy-icon.svg new file mode 100644 index 00000000..77b63083 --- /dev/null +++ b/img/content-copy-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/js/privatebin.js b/js/privatebin.js index 9c843628..df84f94c 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -4901,6 +4901,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { TopNav.showViewButtons(); + CopyToClipboard.showKeyboardShortcutHint(); + // this cannot be grouped with showViewButtons due to remaining time calculation TopNav.showEmailButton(); @@ -5337,6 +5339,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { // shows the remaining time (until) deletion PasteStatus.showRemainingTime(paste); + CopyToClipboard.showKeyboardShortcutHint(); + Promise.all(decryptionPromises) .then(() => { Alert.hideLoading(); @@ -5366,6 +5370,138 @@ jQuery.PrivateBin = (function($, RawDeflate) { return me; })(); + /** + * + * @name CopyToClipboard + * @class + */ + const CopyToClipboard = (function () { + const me = {}; + + let copyButton = $("#prettymessageCopyBtn"), + copyIcon = $("#copyIcon"), + successIcon = $("#copySuccessIcon"), + shortcutHint = $("#copyShortcutHintText"); + + /** + * Handle copy to clipboard button click + * + * @name CopyToClipboard.handleCopyButtonClick + * @private + * @function + */ + function handleCopyButtonClick() { + $(copyButton).click(function() { + const text = PasteViewer.getText(); + saveToClipboard(text); + }); + }; + + /** + * Handle CTRL+C/CMD+C keyboard shortcut + * + * @name CopyToClipboard.handleKeyboardShortcut + * @private + * @function + */ + function handleKeyboardShortcut() { + $(document).bind('copy', function () { + if (!isUserSelectedTextToCopy()) { + const text = PasteViewer.getText(); + saveToClipboard(text); + } + }); + } + + /** + * Check if user selected some text on the page to copy it + * + * @name CopyToClipboard.isUserSelectedTextToCopy + * @private + * @function + * @returns {boolean} + */ + function isUserSelectedTextToCopy() { + let text = ""; + + if (window.getSelection) { + text = window.getSelection().toString(); + } else if (document.selection && document.selection.type != "Control") { + text = document.selection.createRange().text; + } + + return text.length > 0; + } + + /** + * Save text to the clipboard + * + * @name CopyToClipboard.saveToClipboard + * @private + * @param {string} text + * @function + */ + function saveToClipboard(text) { + navigator.clipboard.writeText(text); + toggleSuccessIcon(); + showAlertMessage(); + }; + + /** + * Show alert message after text copy + * + * @name CopyToClipboard.showAlertMessage + * @private + * @function + */ + function showAlertMessage() { + Alert.showStatus("Paste copied to clipboard"); + } + + /** + * Toogle success icon after copy + * + * @name CopyToClipboard.toggleSuccessIcon + * @private + * @function + */ + function toggleSuccessIcon() { + $(copyIcon).css("display", "none"); + $(successIcon).css("display", "block"); + + setTimeout(function() { + $(copyIcon).css("display", "block"); + $(successIcon).css("display", "none"); + }, 1000); + }; + + /** + * Show keyboard shortcut hint + * + * @name CopyToClipboard.showKeyboardShortcutHint + * @function + */ + me.showKeyboardShortcutHint = function () { + I18n._( + shortcutHint, + 'To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c' + ); + } + + /** + * Initialize + * + * @name CopyToClipboard.init + * @function + */ + me.init = function() { + handleCopyButtonClick(); + handleKeyboardShortcut(); + } + + return me; + })(); + /** * (controller) main PrivateBin logic * @@ -5612,6 +5748,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { Prompt.init(); TopNav.init(); UiHelper.init(); + CopyToClipboard.init(); // check for legacy browsers before going any further if (!Legacy.Check.getInit()) { @@ -5668,6 +5805,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { ServerInteraction: ServerInteraction, PasteEncrypter: PasteEncrypter, PasteDecrypter: PasteDecrypter, + CopyToClipboard: CopyToClipboard, Controller: Controller }; })(jQuery, RawDeflate); diff --git a/lib/Configuration.php b/lib/Configuration.php index 9b2717ca..d246a30b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -108,7 +108,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-cbmXvtZ/5gZPFjQDzP3IEhUAIhFPAoM31gw2kRYCT5xOh8wv9gXeDqI/t798luRW1xdC4gaYodjEFCzrsZR4mA==', + 'js/privatebin.js' => 'sha512-9caF+XTVriuyh86qLZ26dHbL6PfyOnSAB6zC2IhP6V/lifBxi28aJK0tm/t+F0GSdFXprzY0k8Ld3fbkbR0YJg==', 'js/purify-3.1.6.js' => 'sha512-SDwfsqHZFhbcBo/6AN7Te4KoUkWHHw7TzyZCuRkkpl0o8oV4owT/lprznWWe9+qFtigb6MrF81K4CQRLN6be+A==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 901bced7..aaa299c2 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -572,7 +572,16 @@ endif;
+
diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 298c1684..57ef0a8e 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -426,7 +426,12 @@ endif;
+
From 0462da6e8e495799be3c07a4fb911e8ebefa4e09 Mon Sep 17 00:00:00 2001 From: ribas160 Date: Wed, 1 Jan 2025 19:14:58 +0200 Subject: [PATCH 2/6] - used bootstrap 5 CSS icon named copy, bootstrap 3 CSS glyphicon named duplicate - keyboard-shortcuts made more accessible by wrapping the keys into kbd-tags - translate messages may contain allowed HTML tags - added the record to the CHANGELOG.md --- CHANGELOG.md | 1 + css/bootstrap/privatebin.css | 25 +++------ css/bootstrap5/privatebin.css | 40 +++++++------ i18n/ar.json | 2 +- i18n/bg.json | 2 +- i18n/ca.json | 2 +- i18n/co.json | 2 +- i18n/cs.json | 2 +- i18n/de.json | 2 +- i18n/el.json | 2 +- i18n/en.json | 2 +- i18n/es.json | 2 +- i18n/et.json | 2 +- i18n/fi.json | 2 +- i18n/fr.json | 2 +- i18n/he.json | 2 +- i18n/hi.json | 2 +- i18n/hu.json | 2 +- i18n/id.json | 2 +- i18n/it.json | 2 +- i18n/ja.json | 2 +- i18n/jbo.json | 2 +- i18n/ko.json | 2 +- i18n/ku.json | 2 +- i18n/la.json | 2 +- i18n/lt.json | 2 +- i18n/nl.json | 2 +- i18n/no.json | 2 +- i18n/oc.json | 2 +- i18n/pl.json | 2 +- i18n/pt.json | 2 +- i18n/ro.json | 2 +- i18n/ru.json | 2 +- i18n/sk.json | 2 +- i18n/sl.json | 2 +- i18n/sv.json | 2 +- i18n/th.json | 2 +- i18n/tr.json | 2 +- i18n/uk.json | 2 +- i18n/zh.json | 2 +- img/content-copy-icon.svg | 1 - js/privatebin.js | 102 ++++++++++++++++++++++------------ lib/Configuration.php | 2 +- tpl/bootstrap.php | 10 +--- tpl/bootstrap5.php | 6 +- 45 files changed, 141 insertions(+), 120 deletions(-) delete mode 100644 img/content-copy-icon.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index d96eabb1..ae2d426d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.7.6 (not yet released) * CHANGED: Switched to WASM streaming and replace unsafe-eval with wasm-unsafe-eval CSP declaration (#1464), requires webserver to have `application/wasm` MIME type configured. * CHANGED: Upgrading libraries to: cloud-storage 1.44.0, aws-sdk-php 3.331.0 +* ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390) ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css index 5f47f6e6..ab2fdebc 100644 --- a/css/bootstrap/privatebin.css +++ b/css/bootstrap/privatebin.css @@ -143,34 +143,23 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose { padding-right: 30px; } -#prettymessageCopyBtn { +#prettyMessageCopyBtn { position: absolute; - top: 5px; - right: 20px; - width: 25px; - height: 25px; + top: 8px; + right: 25px; + left: auto; padding: 0; background: none; border: none; z-index: 1; } -#prettymessageCopyBtn svg { - width: 100%; -} - -#copyIcon { - fill: rgb(145, 152, 161); - opacity: 0.4; - transition: all 0.3s ease; -} - -#copyIcon:hover { - opacity: 1; +html[dir="rtl"] #prettyMessageCopyBtn { + left: 25px; + right: auto; } #copySuccessIcon { - fill: rgb(63, 185, 80); display: none; } diff --git a/css/bootstrap5/privatebin.css b/css/bootstrap5/privatebin.css index 38bc3fdb..b633dbff 100644 --- a/css/bootstrap5/privatebin.css +++ b/css/bootstrap5/privatebin.css @@ -14,6 +14,15 @@ display: none !important; } +.opacity-05-1-hover { + opacity: 0.5; + transition: all 0.15s ease; +} + +.opacity-05-1-hover:hover { + opacity: 1; +} + .dropdown-menu { --bs-dropdown-min-width: 23rem; } @@ -44,33 +53,30 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose { padding-right: 30px; } -#prettymessageCopyBtn { +#prettyMessageCopyBtn { position: absolute; - top: 5px; - right: 5px; - width: 25px; - height: 25px; + top: 8px; + right: 8px; + left: auto; + width: 20px; + height: 20px; padding: 0; background: none; border: none; z-index: 1; } -#prettymessageCopyBtn svg { +html[dir="rtl"] #prettyMessageCopyBtn { + left: 8px; + right: auto; +} + +#prettyMessageCopyBtn svg { width: 100%; -} - -#copyIcon { - fill: rgb(145, 152, 161); - opacity: 0.4; - transition: all 0.3s ease; -} - -#copyIcon:hover { - opacity: 1; + height: 100%; + vertical-align: baseline; } #copySuccessIcon { - fill: rgb(63, 185, 80); display: none; } diff --git a/i18n/ar.json b/i18n/ar.json index 4e4e91ba..56b3b8c6 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/bg.json b/i18n/bg.json index d0e1bcda..e8cf177f 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ca.json b/i18n/ca.json index 26a48446..65159327 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/co.json b/i18n/co.json index 496a92e1..f5a7e9c0 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu.", "Start over": "Principià torna", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/cs.json b/i18n/cs.json index f51c6c9f..de42249a 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Chyba při dekomprimování příspěvku, váš prohlížeč nepodporuje WebAssembly. Pro zobrazení tohoto příspěvku prosím použijte jiný prohlížeč.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/de.json b/i18n/de.json index c918baf0..d250e788 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen.", "Start over": "Neuen Text erstellen", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/el.json b/i18n/el.json index f64e8d63..f88b702e 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/en.json b/i18n/en.json index 040a15b7..28f2efbc 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/es.json b/i18n/es.json index 3b312f43..a7e4206b 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/et.json b/i18n/et.json index 9183e7a2..45d868db 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/fi.json b/i18n/fi.json index 1452ea08..fa8de23f 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/fr.json b/i18n/fr.json index a87e453f..99f1d730 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste.", "Start over": "Recommencer", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/he.json b/i18n/he.json index 77ed3e1d..eed6897b 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/hi.json b/i18n/hi.json index 040a15b7..28f2efbc 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/hu.json b/i18n/hu.json index 97e1fc44..c756a989 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/id.json b/i18n/id.json index 32e274c0..e05f5fd0 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/it.json b/i18n/it.json index 3e9f8162..a6c97ffc 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio.", "Start over": "Ricominciare", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ja.json b/i18n/ja.json index d8c7ae01..f1e5d911 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/jbo.json b/i18n/jbo.json index dc992536..1524be0e 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ko.json b/i18n/ko.json index 040a15b7..28f2efbc 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ku.json b/i18n/ku.json index f56f4b8a..71958f36 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/la.json b/i18n/la.json index e17f7c57..9e522e1d 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/lt.json b/i18n/lt.json index 41a07bbc..81cd6154 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/nl.json b/i18n/nl.json index a6aaa3e4..8d391029 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/no.json b/i18n/no.json index b793472f..4935887c 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/oc.json b/i18n/oc.json index 4226a4ea..8bb3618b 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error al moment de descompresar l'empegatge, vòstre navegador pren pas en carga WebAssembly. Mercés d'utilizar un autre navigador per visualizar aquesta pega.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/pl.json b/i18n/pl.json index 7707a09c..5c2e38e8 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Błąd dekompresowania wklejenia przez brak obsługi WebAssembly przez przeglądarkę. Użyj innej przeglądarki, aby zobaczyć to wklejenie.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/pt.json b/i18n/pt.json index 95b7f5ee..c84f7cde 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ro.json b/i18n/ro.json index 801019a6..aafa33e0 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/ru.json b/i18n/ru.json index 3439835a..5b538bc8 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Запись скопирована в буфер обмена", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "Чтобы скопировать запись нажмите на кнопку скопирования или используйте комбинацию клавиш Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "Чтобы скопировать запись нажмите на кнопку копирования или используйте комбинацию клавиш Ctrl+c/Cmd+c" } diff --git a/i18n/sk.json b/i18n/sk.json index 0441ce78..9136397d 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/sl.json b/i18n/sl.json index 1318735e..84205b49 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/sv.json b/i18n/sv.json index a35c712c..94b10e3c 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/th.json b/i18n/th.json index 21229b43..0dad59dc 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "ไม่สามารถอ่านข้อมูลที่คุณได้ฝากโค้ดไว้ เบราว์เซอร์ของคุณไม่รองรับ WebAssembly กรุณาลองเปลี่ยนใช้เบราว์เซอร์ตัวอื่นเพื่อดูการฝากโค้ดนี้อีกครั้ง", "Start over": "เริ่มใหม่", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/tr.json b/i18n/tr.json index 70d7545c..f06be075 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Yazı açılırken hata oluştu, tarayıcınız WebAssembly'i desteklemiyor. Lütfen bu yazıyı görüntülemek için başka bir tarayıcı kullanın.", "Start over": "Baştan başla", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/uk.json b/i18n/uk.json index 82ba56eb..b4eb3d69 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", "Start over": "Почати знову", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/i18n/zh.json b/i18n/zh.json index f3433912..73b6bc8f 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -222,5 +222,5 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "解压粘贴时出错,您的浏览器不支持 WebAssembly。请使用其他浏览器查看此粘贴。", "Start over": "重新开始", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" } diff --git a/img/content-copy-icon.svg b/img/content-copy-icon.svg deleted file mode 100644 index 77b63083..00000000 --- a/img/content-copy-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/js/privatebin.js b/js/privatebin.js index a4627647..74e37def 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -757,14 +757,14 @@ jQuery.PrivateBin = (function($, RawDeflate) { args[0] = translations[messageId]; } - // messageID may contain links, but should be from a trusted source (code or translation JSON files) - let containsLinks = args[0].indexOf(' 0) may never contain HTML as they may come from untrusted parties - if ((containsLinks ? i > 1 : i > 0) || !containsLinks) { + if ((containsHtml ? i > 1 : i > 0) || !containsHtml) { args[i] = Helper.htmlEntities(args[i]); } } @@ -772,11 +772,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { // format string let output = Helper.sprintf.apply(this, args); - if (containsLinks) { + if (containsHtml) { // only allow tags/attributes we actually use in translations output = DOMPurify.sanitize( output, { - ALLOWED_TAGS: ['a', 'i', 'span'], + ALLOWED_TAGS: ['a', 'i', 'span', 'kbd'], ALLOWED_ATTR: ['href', 'id'] } ); @@ -784,7 +784,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // if $element is given, insert translation if ($element !== null) { - if (containsLinks) { + if (containsHtml) { $element.html(output); } else { // text node takes care of entity encoding @@ -914,6 +914,25 @@ jQuery.PrivateBin = (function($, RawDeflate) { translations = mockTranslations || {}; }; + /** + * Check if string contains valid HTML code + * + * @name I18n.isStringContainsHtml + * @function + * @private + * @param {string} messageId + * @returns {boolean} + */ + function isStringContainsHtml(messageId) { + // An integer which specifies the type of the node. An Element node like

or

. + const elementNodeType = 1; + + const div = document.createElement('div'); + div.innerHTML = messageId; + + return Array.from(div.childNodes).some(node => node.nodeType === elementNodeType); + } + return me; })(); @@ -3768,7 +3787,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { /** * Clear the password input in the top navigation - * + * * @name TopNav.clearPasswordInput * @function */ @@ -5371,21 +5390,21 @@ jQuery.PrivateBin = (function($, RawDeflate) { })(); /** - * + * * @name CopyToClipboard * @class */ const CopyToClipboard = (function () { const me = {}; - let copyButton = $("#prettymessageCopyBtn"), - copyIcon = $("#copyIcon"), - successIcon = $("#copySuccessIcon"), - shortcutHint = $("#copyShortcutHintText"); + let copyButton = $('#prettyMessageCopyBtn'), + copyIcon = $('#copyIcon'), + successIcon = $('#copySuccessIcon'), + shortcutHint = $('#copyShortcutHintText'); /** * Handle copy to clipboard button click - * + * * @name CopyToClipboard.handleCopyButtonClick * @private * @function @@ -5399,7 +5418,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { /** * Handle CTRL+C/CMD+C keyboard shortcut - * + * * @name CopyToClipboard.handleKeyboardShortcut * @private * @function @@ -5411,31 +5430,31 @@ jQuery.PrivateBin = (function($, RawDeflate) { saveToClipboard(text); } }); - } + }; /** * Check if user selected some text on the page to copy it - * + * * @name CopyToClipboard.isUserSelectedTextToCopy * @private * @function * @returns {boolean} */ function isUserSelectedTextToCopy() { - let text = ""; - + let text = ''; + if (window.getSelection) { text = window.getSelection().toString(); - } else if (document.selection && document.selection.type != "Control") { + } else if (document.selection && document.selection.type != 'Control') { text = document.selection.createRange().text; } - + return text.length > 0; - } + }; /** * Save text to the clipboard - * + * * @name CopyToClipboard.saveToClipboard * @private * @param {string} text @@ -5449,55 +5468,65 @@ jQuery.PrivateBin = (function($, RawDeflate) { /** * Show alert message after text copy - * + * * @name CopyToClipboard.showAlertMessage * @private * @function */ function showAlertMessage() { - Alert.showStatus("Paste copied to clipboard"); - } + Alert.showStatus(I18n._('Paste copied to clipboard')); + }; /** * Toogle success icon after copy - * + * * @name CopyToClipboard.toggleSuccessIcon * @private * @function */ function toggleSuccessIcon() { - $(copyIcon).css("display", "none"); - $(successIcon).css("display", "block"); + $(copyIcon).css('display', 'none'); + $(successIcon).css('display', 'block'); setTimeout(function() { - $(copyIcon).css("display", "block"); - $(successIcon).css("display", "none"); + $(copyIcon).css('display', 'block'); + $(successIcon).css('display', 'none'); }, 1000); }; /** * Show keyboard shortcut hint - * + * * @name CopyToClipboard.showKeyboardShortcutHint * @function */ me.showKeyboardShortcutHint = function () { I18n._( shortcutHint, - 'To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c' + 'To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c' ); - } + }; + + /** + * Hide keyboard shortcut hint + * + * @name CopyToClipboard.showKeyboardShortcutHint + * @function + */ + me.hideKeyboardShortcutHint = function () { + $(shortcutHint).html(''); + }; /** * Initialize - * + * * @name CopyToClipboard.init * @function */ me.init = function() { handleCopyButtonClick(); handleKeyboardShortcut(); - } + }; return me; })(); @@ -5523,6 +5552,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { { PasteStatus.hideMessages(); Alert.hideMessages(); + CopyToClipboard.hideKeyboardShortcutHint(); }; /** diff --git a/lib/Configuration.php b/lib/Configuration.php index ec753793..a262e8fe 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -108,7 +108,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-l9FxMcY99yenozSdmWgraPIfGd0TMdAMs3TBRZCKHrBECJqiYS385wfLdN8D3ffpa0HZHvgjRyk2Txs0r+v6FQ==', + 'js/privatebin.js' => 'sha512-4ZwwNQ6GWRx90JqxNJ5SI7qN9A75r1f5vWUd3+GUXEkXvNmygjDGR/unOvKRgGZxXYhW5N42ytNx7CXes0MX/Q==', 'js/purify-3.1.7.js' => 'sha512-LegvqULiMtOfboJZw9MpETN/b+xnLRXZI90gG7oIFHW+yAeHmKvRtEUbiMFx2WvUqQoL9XB3gwU+hWXUT0X+8A==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index e9777a0a..d0a4aa45 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -581,13 +581,9 @@ endif;
diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index ddd9d6ce..fb45ffd7 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -437,9 +437,9 @@ endif;
From b86eb93dbe553482fe7003e8a5429bab6b360061 Mon Sep 17 00:00:00 2001 From: ribas160 Date: Fri, 3 Jan 2025 18:19:12 +0200 Subject: [PATCH 3/6] Added the button to copy the paste link to the clipboard --- CREDITS.md | 1 + i18n/ar.json | 4 +++- i18n/bg.json | 4 +++- i18n/ca.json | 4 +++- i18n/co.json | 4 +++- i18n/cs.json | 4 +++- i18n/de.json | 4 +++- i18n/el.json | 4 +++- i18n/en.json | 4 +++- i18n/es.json | 4 +++- i18n/et.json | 4 +++- i18n/fi.json | 4 +++- i18n/fr.json | 4 +++- i18n/he.json | 4 +++- i18n/hi.json | 4 +++- i18n/hu.json | 4 +++- i18n/id.json | 4 +++- i18n/it.json | 4 +++- i18n/ja.json | 4 +++- i18n/jbo.json | 4 +++- i18n/ko.json | 4 +++- i18n/ku.json | 4 +++- i18n/la.json | 4 +++- i18n/lt.json | 4 +++- i18n/nl.json | 4 +++- i18n/no.json | 4 +++- i18n/oc.json | 4 +++- i18n/pl.json | 4 +++- i18n/pt.json | 4 +++- i18n/ro.json | 4 +++- i18n/ru.json | 4 +++- i18n/sk.json | 4 +++- i18n/sl.json | 4 +++- i18n/sv.json | 4 +++- i18n/th.json | 4 +++- i18n/tr.json | 4 +++- i18n/uk.json | 4 +++- i18n/zh.json | 4 +++- js/privatebin.js | 44 ++++++++++++++++++++++++++++++++++++++----- lib/Configuration.php | 2 +- tpl/bootstrap.php | 3 +++ tpl/bootstrap5.php | 3 +++ 42 files changed, 158 insertions(+), 43 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 2ca6fe0b..e5513a1f 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -33,6 +33,7 @@ * Mounir Idrassi & J. Mozdzen - secure YOURLS integration * Felipe Nakandakari - enabled AWS SDK to use default credential provider chain in the S3 Storage backend * Aaron Sherber - cache control headers for API calls & use of `shortenviayourls` in query parameters +* Mikhail Romanov - copying to clipboard ## Translations * Hexalyse - French diff --git a/i18n/ar.json b/i18n/ar.json index 56b3b8c6..16903e72 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/bg.json b/i18n/bg.json index e8cf177f..d8707475 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ca.json b/i18n/ca.json index 65159327..b24503f3 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/co.json b/i18n/co.json index f5a7e9c0..9a39726d 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu.", "Start over": "Principià torna", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/cs.json b/i18n/cs.json index de42249a..c3510eac 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Chyba při dekomprimování příspěvku, váš prohlížeč nepodporuje WebAssembly. Pro zobrazení tohoto příspěvku prosím použijte jiný prohlížeč.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/de.json b/i18n/de.json index d250e788..4af7d517 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen.", "Start over": "Neuen Text erstellen", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/el.json b/i18n/el.json index f88b702e..947909ee 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/en.json b/i18n/en.json index 28f2efbc..4a30584c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/es.json b/i18n/es.json index a7e4206b..6520252e 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/et.json b/i18n/et.json index 45d868db..013eef15 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/fi.json b/i18n/fi.json index fa8de23f..328a647a 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/fr.json b/i18n/fr.json index 99f1d730..0f04cd09 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste.", "Start over": "Recommencer", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/he.json b/i18n/he.json index eed6897b..3b01e387 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/hi.json b/i18n/hi.json index 28f2efbc..4a30584c 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/hu.json b/i18n/hu.json index c756a989..333cb80b 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/id.json b/i18n/id.json index e05f5fd0..1cd680b6 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/it.json b/i18n/it.json index a6c97ffc..a33f09c3 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio.", "Start over": "Ricominciare", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ja.json b/i18n/ja.json index f1e5d911..ec5255c7 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/jbo.json b/i18n/jbo.json index 1524be0e..960ac963 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ko.json b/i18n/ko.json index 28f2efbc..4a30584c 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ku.json b/i18n/ku.json index 71958f36..32bff821 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/la.json b/i18n/la.json index 9e522e1d..2d876806 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/lt.json b/i18n/lt.json index 81cd6154..f6b59605 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/nl.json b/i18n/nl.json index 8d391029..650c7401 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/no.json b/i18n/no.json index 4935887c..022b12cd 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/oc.json b/i18n/oc.json index 8bb3618b..e7906ff6 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error al moment de descompresar l'empegatge, vòstre navegador pren pas en carga WebAssembly. Mercés d'utilizar un autre navigador per visualizar aquesta pega.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/pl.json b/i18n/pl.json index 5c2e38e8..149682c2 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Błąd dekompresowania wklejenia przez brak obsługi WebAssembly przez przeglądarkę. Użyj innej przeglądarki, aby zobaczyć to wklejenie.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/pt.json b/i18n/pt.json index c84f7cde..618bdff2 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ro.json b/i18n/ro.json index aafa33e0..055a797e 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/ru.json b/i18n/ru.json index 5b538bc8..01ad80fa 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Запись скопирована в буфер обмена", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "Чтобы скопировать запись нажмите на кнопку копирования или используйте комбинацию клавиш Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "Чтобы скопировать запись нажмите на кнопку копирования или используйте комбинацию клавиш Ctrl+c/Cmd+c", + "Copy link": "Скопировать ссылку", + "Link copied to clipboard": "Ссылка скопирована в буфер обмена" } diff --git a/i18n/sk.json b/i18n/sk.json index 9136397d..20f56b96 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/sl.json b/i18n/sl.json index 84205b49..665c057d 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/sv.json b/i18n/sv.json index 94b10e3c..56948010 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", "Start over": "Start over", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/th.json b/i18n/th.json index 0dad59dc..1629bb9c 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "ไม่สามารถอ่านข้อมูลที่คุณได้ฝากโค้ดไว้ เบราว์เซอร์ของคุณไม่รองรับ WebAssembly กรุณาลองเปลี่ยนใช้เบราว์เซอร์ตัวอื่นเพื่อดูการฝากโค้ดนี้อีกครั้ง", "Start over": "เริ่มใหม่", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/tr.json b/i18n/tr.json index f06be075..0fd28f6f 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Yazı açılırken hata oluştu, tarayıcınız WebAssembly'i desteklemiyor. Lütfen bu yazıyı görüntülemek için başka bir tarayıcı kullanın.", "Start over": "Baştan başla", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/uk.json b/i18n/uk.json index b4eb3d69..ae76312f 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", "Start over": "Почати знову", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/i18n/zh.json b/i18n/zh.json index 73b6bc8f..1c7c5f38 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -222,5 +222,7 @@ "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "解压粘贴时出错,您的浏览器不支持 WebAssembly。请使用其他浏览器查看此粘贴。", "Start over": "重新开始", "Paste copied to clipboard": "Paste copied to clipboard", - "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c" + "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c": "To copy paste press on the copy button or use the clipboard shortcut Ctrl+c/Cmd+c", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard" } diff --git a/js/privatebin.js b/js/privatebin.js index 74e37def..483eb333 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -4920,6 +4920,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { TopNav.showViewButtons(); + CopyToClipboard.setUrl(url); CopyToClipboard.showKeyboardShortcutHint(); // this cannot be grouped with showViewButtons due to remaining time calculation @@ -5398,9 +5399,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { const me = {}; let copyButton = $('#prettyMessageCopyBtn'), + copyLinkButton = $('#copyLink'), copyIcon = $('#copyIcon'), successIcon = $('#copySuccessIcon'), - shortcutHint = $('#copyShortcutHintText'); + shortcutHint = $('#copyShortcutHintText'), + url; /** * Handle copy to clipboard button click @@ -5413,9 +5416,27 @@ jQuery.PrivateBin = (function($, RawDeflate) { $(copyButton).click(function() { const text = PasteViewer.getText(); saveToClipboard(text); + + toggleSuccessIcon(); + showAlertMessage('Paste copied to clipboard'); }); }; + /** + * Handle copy link to clipboard button click + * + * @name CopyToClipboard.handleCopyLinkButtonClick + * @private + * @function + */ + function handleCopyLinkButtonClick() { + $(copyLinkButton).click(function () { + saveToClipboard(url); + + showAlertMessage('Link copied to clipboard'); + }); + } + /** * Handle CTRL+C/CMD+C keyboard shortcut * @@ -5428,6 +5449,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (!isUserSelectedTextToCopy()) { const text = PasteViewer.getText(); saveToClipboard(text); + + showAlertMessage('Paste copied to clipboard'); } }); }; @@ -5462,8 +5485,6 @@ jQuery.PrivateBin = (function($, RawDeflate) { */ function saveToClipboard(text) { navigator.clipboard.writeText(text); - toggleSuccessIcon(); - showAlertMessage(); }; /** @@ -5471,10 +5492,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { * * @name CopyToClipboard.showAlertMessage * @private + * @param {string} message * @function */ - function showAlertMessage() { - Alert.showStatus(I18n._('Paste copied to clipboard')); + function showAlertMessage(message) { + Alert.showStatus(message); }; /** @@ -5517,6 +5539,17 @@ jQuery.PrivateBin = (function($, RawDeflate) { $(shortcutHint).html(''); }; + /** + * Set paste url + * + * @name CopyToClipboard.setUrl + * @param {string} newUrl + * @function + */ + me.setUrl = function (newUrl) { + url = newUrl; + }; + /** * Initialize * @@ -5525,6 +5558,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { */ me.init = function() { handleCopyButtonClick(); + handleCopyLinkButtonClick(); handleKeyboardShortcut(); }; diff --git a/lib/Configuration.php b/lib/Configuration.php index a262e8fe..2dba64ac 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -108,7 +108,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-4ZwwNQ6GWRx90JqxNJ5SI7qN9A75r1f5vWUd3+GUXEkXvNmygjDGR/unOvKRgGZxXYhW5N42ytNx7CXes0MX/Q==', + 'js/privatebin.js' => 'sha512-cCt3Slm10JXtPJhgmYdf1RKO7uWdz6U+k0bdPjTYfdO6WeWfruN9RkJE7tKmpgw8A35H4Xifmrr2KmyVOMbc3g==', 'js/purify-3.1.7.js' => 'sha512-LegvqULiMtOfboJZw9MpETN/b+xnLRXZI90gG7oIFHW+yAeHmKvRtEUbiMFx2WvUqQoL9XB3gwU+hWXUT0X+8A==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index d0a4aa45..f4780797 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -535,6 +535,9 @@ if ($HTTPWARNING) : endif; ?>