diff --git a/CHANGELOG.md b/CHANGELOG.md index d73e4c95..4be3f99a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # PrivateBin version history ## 1.7.6 (not yet released) +* ADDED: Ability to copy the paste by clicking the copy icon button or using the keyboard shortcut ctrl+c/cmd+c (#1390 & #12) * CHANGED: Allow toggling tab-key-support using `[Ctrl]+[m]` or `[Esc]` in textarea for keyboard navigation (#1386) * 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: Replaced usage of strpos with str_starts_with & str_contains (#1373) +* CHANGED: Added polyfill libraries for ctype, str_starts_with & str_contains functions (#1476) * CHANGED: Upgrading libraries to: cloud-storage 1.44.0, aws-sdk-php 3.331.0 ## 1.7.5 (2024-11-16) 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/composer.json b/composer.json index 10024a08..169b24bb 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,8 @@ "php": "^7.3 || ^8.0", "jdenticon/jdenticon": "1.0.2", "mlocati/ip-lib": "1.18.1", + "symfony/polyfill-ctype": "^1.31", + "symfony/polyfill-php80": "^1.31", "yzalis/identicon": "2.0.0" }, "suggest" : { diff --git a/composer.lock b/composer.lock index a72fb37c..58222e9f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bb78267a7d61d23706111a91bc90d515", + "content-hash": "0fdf0f08646fa2a4cf9c076131f529f5", "packages": [ { "name": "jdenticon/jdenticon", @@ -126,6 +126,165 @@ ], "time": "2024-10-29T15:44:19+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "yzalis/identicon", "version": "2.0.0", @@ -810,16 +969,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.21", + "version": "9.6.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", "shasum": "" }, "require": { @@ -830,7 +989,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.3", @@ -893,7 +1052,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" }, "funding": [ { @@ -909,7 +1068,7 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:50:18+00:00" + "time": "2024-12-05T13:48:26+00:00" }, { "name": "sebastian/cli-parser", diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css index f986b835..ab2fdebc 100644 --- a/css/bootstrap/privatebin.css +++ b/css/bootstrap/privatebin.css @@ -138,3 +138,31 @@ html[dir="rtl"] #language { html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose { float: left; } + +#prettyprint { + padding-right: 30px; +} + +#prettyMessageCopyBtn { + position: absolute; + top: 8px; + right: 25px; + left: auto; + padding: 0; + background: none; + border: none; + z-index: 1; +} + +html[dir="rtl"] #prettyMessageCopyBtn { + left: 25px; + right: auto; +} + +#copySuccessIcon { + 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 acbcf63d..d52a2aff 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; } @@ -43,3 +52,35 @@ 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: 8px; + right: 8px; + left: auto; + width: 20px; + height: 20px; + padding: 0; + background: none; + border: none; + z-index: 1; +} + +html[dir="rtl"] #prettyMessageCopyBtn { + left: 8px; + right: auto; +} + +#prettyMessageCopyBtn svg { + width: 100%; + height: 100%; + vertical-align: baseline; +} + +#copySuccessIcon { + display: none; +} diff --git a/css/privatebin.css b/css/privatebin.css index 291f98f2..243b1e87 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 ac7a4de5..cde4b990 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/bg.json b/i18n/bg.json index 2c7d682b..8974c2d2 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ca.json b/i18n/ca.json index 3029e919..732ca3e6 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/co.json b/i18n/co.json index beba4159..76959ca1 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/cs.json b/i18n/cs.json index eea080b5..88148d61 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -221,6 +221,10 @@ "Error compressing paste, due to missing WebAssembly support.": "Chyba při komprimování příspěvku kvůli chybějící podpoře WebAssembly.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/de.json b/i18n/de.json index 6b19ea60..4f1fa502 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/el.json b/i18n/el.json index ba400ef6..9b08e8c6 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -221,6 +221,10 @@ "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. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/en.json b/i18n/en.json index 9d0eaa25..bf36c662 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/es.json b/i18n/es.json index b6eba892..e2cc926c 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/et.json b/i18n/et.json index 07a79ffa..6e8a83fc 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/fi.json b/i18n/fi.json index 2452ea0a..446b9e82 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/fr.json b/i18n/fr.json index ebf2dfe4..4fc0657c 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/he.json b/i18n/he.json index b5a5f00f..9c28fcf0 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/hi.json b/i18n/hi.json index 9d0eaa25..bf36c662 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/hu.json b/i18n/hu.json index 7eca7642..462c64c7 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/id.json b/i18n/id.json index fd22eb8f..1a483262 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/it.json b/i18n/it.json index 7c508d1f..d084a2a7 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ja.json b/i18n/ja.json index d233810b..42dcba2d 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/jbo.json b/i18n/jbo.json index 3de3ce47..9503a47d 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ko.json b/i18n/ko.json index 9d0eaa25..bf36c662 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ku.json b/i18n/ku.json index cc0bc7b9..c3dc506f 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/la.json b/i18n/la.json index 62bdf473..7e1888be 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/lt.json b/i18n/lt.json index 30e904b6..5de37956 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -221,6 +221,10 @@ "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ę.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/nl.json b/i18n/nl.json index ff63d406..670895a7 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/no.json b/i18n/no.json index fc4bc9ec..36b3cf88 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/oc.json b/i18n/oc.json index df16f2e9..669bbcf6 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -221,6 +221,10 @@ "Error compressing paste, due to missing WebAssembly support.": "Error al moment de la compression de l'empegatge, a causa de la manca de presa en carga de WebAssembly.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/pl.json b/i18n/pl.json index 2104e7ce..fb5dc73b 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -221,6 +221,10 @@ "Error compressing paste, due to missing WebAssembly support.": "Błąd kompresowania wklejenia przez brak obsługi WebAssembly.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/pt.json b/i18n/pt.json index 13779f47..b24d5066 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ro.json b/i18n/ro.json index c6b33f36..396b1f41 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/ru.json b/i18n/ru.json index 2af27f65..6eede6d7 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Скопировать ссылку", + "Link copied to clipboard": "Ссылка скопирована в буфер обмена", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/sk.json b/i18n/sk.json index c566c343..3853cc31 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/sl.json b/i18n/sl.json index d6b0d11c..578c47fa 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/sv.json b/i18n/sv.json index c87a2d40..8f6dfad1 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -221,6 +221,10 @@ "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.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/th.json b/i18n/th.json index 72948e33..48e60707 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -221,6 +221,10 @@ "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 กรุณาลองเปลี่ยนใช้เบราว์เซอร์ตัวอื่นเพื่อดูการฝากโค้ดนี้อีกครั้ง", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/tr.json b/i18n/tr.json index 26abcd54..c0db56ae 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -221,6 +221,10 @@ "Error compressing paste, due to missing WebAssembly support.": "WebAssembly desteği eksik olduğundan yazı sıkıştırılamadı.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/uk.json b/i18n/uk.json index 8f5f87e1..68cb73aa 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -221,6 +221,10 @@ "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. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/i18n/zh.json b/i18n/zh.json index 58b030e8..7afedb16 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -221,6 +221,10 @@ "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。请使用其他浏览器查看此粘贴。", "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", + "Copy link": "Copy link", + "Link copied to clipboard": "Link copied to clipboard", "Paste text": "Paste text", "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)": "Tabulator key serves as character (Hit Ctrl+m or Esc to toggle)" } diff --git a/js/privatebin.js b/js/privatebin.js index f88753b5..284de400 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; })(); @@ -4958,6 +4977,9 @@ jQuery.PrivateBin = (function($, RawDeflate) { TopNav.showViewButtons(); + CopyToClipboard.setUrl(url); + CopyToClipboard.showKeyboardShortcutHint(); + // this cannot be grouped with showViewButtons due to remaining time calculation TopNav.showEmailButton(); @@ -5394,6 +5416,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { // shows the remaining time (until) deletion PasteStatus.showRemainingTime(paste); + CopyToClipboard.showKeyboardShortcutHint(); + Promise.all(decryptionPromises) .then(() => { Alert.hideLoading(); @@ -5423,6 +5447,181 @@ jQuery.PrivateBin = (function($, RawDeflate) { return me; })(); + /** + * + * @name CopyToClipboard + * @class + */ + const CopyToClipboard = (function () { + const me = {}; + + let copyButton = $('#prettyMessageCopyBtn'), + copyLinkButton = $('#copyLink'), + copyIcon = $('#copyIcon'), + successIcon = $('#copySuccessIcon'), + shortcutHint = $('#copyShortcutHintText'), + url; + + /** + * Handle copy to clipboard button click + * + * @name CopyToClipboard.handleCopyButtonClick + * @private + * @function + */ + function handleCopyButtonClick() { + $(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 + * + * @name CopyToClipboard.handleKeyboardShortcut + * @private + * @function + */ + function handleKeyboardShortcut() { + $(document).bind('copy', function () { + if (!isUserSelectedTextToCopy()) { + const text = PasteViewer.getText(); + saveToClipboard(text); + + showAlertMessage('Paste copied to clipboard'); + } + }); + }; + + /** + * 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); + }; + + /** + * Show alert message after text copy + * + * @name CopyToClipboard.showAlertMessage + * @private + * @param {string} message + * @function + */ + function showAlertMessage(message) { + Alert.showStatus(message); + }; + + /** + * 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' + ); + }; + + /** + * Hide keyboard shortcut hint + * + * @name CopyToClipboard.showKeyboardShortcutHint + * @function + */ + me.hideKeyboardShortcutHint = function () { + $(shortcutHint).html(''); + }; + + /** + * Set paste url + * + * @name CopyToClipboard.setUrl + * @param {string} newUrl + * @function + */ + me.setUrl = function (newUrl) { + url = newUrl; + }; + + /** + * Initialize + * + * @name CopyToClipboard.init + * @function + */ + me.init = function() { + handleCopyButtonClick(); + handleCopyLinkButtonClick(); + handleKeyboardShortcut(); + }; + + return me; + })(); + /** * (controller) main PrivateBin logic * @@ -5444,6 +5643,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { { PasteStatus.hideMessages(); Alert.hideMessages(); + CopyToClipboard.hideKeyboardShortcutHint(); }; /** @@ -5669,6 +5869,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()) { @@ -5728,6 +5929,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 6bc95238..758d2a1f 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-1RKY0XUEbDtZ6M4/YUwmLsav/qSzteqc/93jvEaH5mFLhCl8f+dItPy6Q8hUcydz10oyCYrB4DFSAtYfcaKZMg==', + 'js/privatebin.js' => 'sha512-y5pDCqVhRdT+tnV0Klp4wfjYPEPz/C31k/16QwaIV3sjQSxQq3mpqMfXlgFzVgxFyRjWQNZHMcik4naNl8rzEw==', '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/lib/Data/GoogleCloudStorage.php b/lib/Data/GoogleCloudStorage.php index 8fa19861..45af05ee 100644 --- a/lib/Data/GoogleCloudStorage.php +++ b/lib/Data/GoogleCloudStorage.php @@ -371,7 +371,7 @@ class GoogleCloudStorage extends AbstractData try { foreach ($this->_bucket->objects(array('prefix' => $prefix)) as $object) { $candidate = substr($object->name(), strlen($prefix)); - if (strpos($candidate, '/') === false) { + if (!str_contains($candidate, '/')) { $pastes[] = $candidate; } } diff --git a/lib/Data/S3Storage.php b/lib/Data/S3Storage.php index 30c705dd..70505aac 100644 --- a/lib/Data/S3Storage.php +++ b/lib/Data/S3Storage.php @@ -462,7 +462,7 @@ class S3Storage extends AbstractData try { foreach ($this->_listAllObjects($prefix) as $object) { $candidate = substr($object['Key'], strlen($prefix)); - if (strpos($candidate, '/') === false) { + if (!str_contains($candidate, '/')) { $pastes[] = $candidate; } } diff --git a/lib/I18n.php b/lib/I18n.php index 89693083..2ef9effd 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -131,7 +131,7 @@ class I18n $argsCount = count($args); for ($i = 0; $i < $argsCount; ++$i) { if ($i === 0) { - if (strpos($args[0], '') !== false) { + if (str_contains($args[0], '')) { continue; } } elseif (is_int($args[$i])) { diff --git a/lib/Request.php b/lib/Request.php index 4e6d1f1a..53a8adb0 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -146,7 +146,7 @@ class Request } elseif (array_key_exists('jsonld', $this->_params) && !empty($this->_params['jsonld'])) { $this->_operation = 'jsonld'; } elseif (array_key_exists('link', $this->_params) && !empty($this->_params['link'])) { - if (strpos($this->getRequestUri(), '/shortenviayourls') !== false || array_key_exists('shortenviayourls', $this->_params)) { + if (str_contains($this->getRequestUri(), '/shortenviayourls') || array_key_exists('shortenviayourls', $this->_params)) { $this->_operation = 'yourlsproxy'; } } @@ -267,9 +267,9 @@ class Request (array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'JSONHttpRequest') || ($hasAcceptHeader && - strpos($acceptHeader, self::MIME_JSON) !== false && - strpos($acceptHeader, self::MIME_HTML) === false && - strpos($acceptHeader, self::MIME_XHTML) === false) + str_contains($acceptHeader, self::MIME_JSON) && + !str_contains($acceptHeader, self::MIME_HTML) && + !str_contains($acceptHeader, self::MIME_XHTML)) ) { return true; } @@ -300,11 +300,11 @@ class Request foreach ($mediaTypes as $acceptedQuality => $acceptedValues) { foreach ($acceptedValues as $acceptedValue) { if ( - strpos($acceptedValue, self::MIME_HTML) === 0 || - strpos($acceptedValue, self::MIME_XHTML) === 0 + str_starts_with($acceptedValue, self::MIME_HTML) || + str_starts_with($acceptedValue, self::MIME_XHTML) ) { return false; - } elseif (strpos($acceptedValue, self::MIME_JSON) === 0) { + } elseif (str_starts_with($acceptedValue, self::MIME_JSON)) { return true; } } diff --git a/lib/YourlsProxy.php b/lib/YourlsProxy.php index de46a12b..a7c6ad6d 100644 --- a/lib/YourlsProxy.php +++ b/lib/YourlsProxy.php @@ -47,7 +47,7 @@ class YourlsProxy */ public function __construct(Configuration $conf, $link) { - if (strpos($link, $conf->getKey('basepath') . '?') !== 0) { + if (!str_starts_with($link, $conf->getKey('basepath') . '?')) { $this->_error = 'Trying to shorten a URL that isn\'t pointing at our instance.'; return; } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index a34bcec0..5f53fb57 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -535,6 +535,9 @@ if ($HTTPWARNING) : endif; ?>