From a4a32f6b9e0213797ad43b9b458dbd5fbc86614b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 20 Jun 2021 08:43:44 +0200 Subject: [PATCH 001/501] switch to streaming WASM loading, fixes #814 --- js/zlib-1.2.11.js | 57 ++++++++++++++++++++--------------------------- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/js/zlib-1.2.11.js b/js/zlib-1.2.11.js index ed0abea8..835cb968 100644 --- a/js/zlib-1.2.11.js +++ b/js/zlib-1.2.11.js @@ -1,6 +1,6 @@ 'use strict'; -(function() { +(function () { let ret; async function initialize() { @@ -23,16 +23,7 @@ _abort: errno => { console.error(`Error: ${errno}`) }, _grow: () => { }, }; - - let buff; - if (typeof fetch === 'undefined') { - buff = fs.readFileSync('zlib-1.2.11.wasm'); - } else { - const resp = await fetch('js/zlib-1.2.11.wasm'); - buff = await resp.arrayBuffer(); - } - const module = await WebAssembly.compile(buff); - const ins = await WebAssembly.instantiate(module, { env }); + const ins = await WebAssembly.instantiateStreaming(fetch('js/zlib-1.2.11.wasm'), { env }); const srcPtr = ins.exports._malloc(CHUNK_SIZE); const dstPtr = ins.exports._malloc(CHUNK_SIZE); @@ -116,28 +107,28 @@ } ret = { - inflate(rawDeflateBuffer) { - const rawInf = new RawInf(); - for (let offset = 0; offset < rawDeflateBuffer.length; offset += CHUNK_SIZE) { - const end = Math.min(offset + CHUNK_SIZE, rawDeflateBuffer.length); - const chunk = rawDeflateBuffer.subarray(offset, end); - rawInf.inflate(chunk); - } - const ret = rawInf.getBuffer(); - rawInf.destroy(); - return ret; - }, - deflate(rawInflateBuffer) { - const rawDef = new RawDef(); - for (let offset = 0; offset < rawInflateBuffer.length; offset += CHUNK_SIZE) { - const end = Math.min(offset + CHUNK_SIZE, rawInflateBuffer.length); - const chunk = rawInflateBuffer.subarray(offset, end); - rawDef.deflate(chunk, rawInflateBuffer.length <= offset + CHUNK_SIZE); - } - const ret = rawDef.getBuffer(); - rawDef.destroy(); - return ret; - }, + inflate(rawDeflateBuffer) { + const rawInf = new RawInf(); + for (let offset = 0; offset < rawDeflateBuffer.length; offset += CHUNK_SIZE) { + const end = Math.min(offset + CHUNK_SIZE, rawDeflateBuffer.length); + const chunk = rawDeflateBuffer.subarray(offset, end); + rawInf.inflate(chunk); + } + const ret = rawInf.getBuffer(); + rawInf.destroy(); + return ret; + }, + deflate(rawInflateBuffer) { + const rawDef = new RawDef(); + for (let offset = 0; offset < rawInflateBuffer.length; offset += CHUNK_SIZE) { + const end = Math.min(offset + CHUNK_SIZE, rawInflateBuffer.length); + const chunk = rawInflateBuffer.subarray(offset, end); + rawDef.deflate(chunk, rawInflateBuffer.length <= offset + CHUNK_SIZE); + } + const ret = rawDef.getBuffer(); + rawDef.destroy(); + return ret; + }, } return ret; diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 1e4eae00..86c15de2 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -54,7 +54,7 @@ if ($ZEROBINCOMPATIBILITY) : - + diff --git a/tpl/page.php b/tpl/page.php index 28f37b90..f3b26d4e 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -33,7 +33,7 @@ if ($ZEROBINCOMPATIBILITY): - + Date: Sun, 20 Jun 2021 08:44:25 +0200 Subject: [PATCH 002/501] remove unsafe-eval from CSP --- cfg/conf.sample.php | 2 +- lib/Configuration.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index d362f3f2..bfae7563 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -87,7 +87,7 @@ languageselection = false ; async functions and display an error if not and for Chrome to enable ; webassembly support (used for zlib compression). You can remove it if Chrome ; doesn't need to be supported and old browsers don't need to be warned. -; cspheader = "default-src 'none'; base-uri 'self'; form-action 'none'; manifest-src 'self'; connect-src * blob:; script-src 'self' 'unsafe-eval' resource:; style-src 'self'; font-src 'self'; img-src 'self' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads" +; cspheader = "default-src 'none'; base-uri 'self'; form-action 'none'; manifest-src 'self'; connect-src * blob:; script-src 'self' resource:; style-src 'self'; font-src 'self'; img-src 'self' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads" ; stay compatible with PrivateBin Alpha 0.19, less secure ; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of diff --git a/lib/Configuration.php b/lib/Configuration.php index 7c4eb106..35e5b40f 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -54,7 +54,7 @@ class Configuration 'urlshortener' => '', 'qrcode' => true, 'icon' => 'identicon', - 'cspheader' => 'default-src \'none\'; base-uri \'self\'; form-action \'none\'; manifest-src \'self\'; connect-src * blob:; script-src \'self\' \'unsafe-eval\' resource:; style-src \'self\'; font-src \'self\'; img-src \'self\' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads', + 'cspheader' => 'default-src \'none\'; base-uri \'self\'; form-action \'none\'; manifest-src \'self\'; connect-src * blob:; script-src \'self\' resource:; style-src \'self\'; font-src \'self\'; img-src \'self\' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-downloads', 'zerobincompatibility' => false, 'httpwarning' => true, 'compression' => 'zlib', From ab5fa3d14d1c951689ab04dfe66ca14121a99e9f Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 16 Nov 2024 08:27:23 +0100 Subject: [PATCH 003/501] chore: prepare for next release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13bdfaa0..456c6c29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # PrivateBin version history +## 1.7.6 (not yet released) + ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) * ADDED: Show a button (that redirects to the `basepath` URL) inside the alert after a paste is deleted From 85241f2615bbe5c2660a8235cbbdc37b15a1eed0 Mon Sep 17 00:00:00 2001 From: PrivateBin Translator Bot <72346835+privatebin-translator@users.noreply.github.com> Date: Sun, 17 Nov 2024 00:49:57 +0100 Subject: [PATCH 004/501] New translations en.json (Norwegian) --- i18n/no.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/no.json b/i18n/no.json index 0917cbee..e04be3ca 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -211,9 +211,9 @@ "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Besøk denne lenken for å se notatet. Hvis lenken deles med andre, vil de også kunne se notatet.", "URL shortener may expose your decrypt key in URL.": "URL forkorter kan avsløre dekrypteringsnøkkelen.", "Save paste": "Lagre utklipp", - "Your IP is not authorized to create pastes.": "Din IP er ikke autorisert til å opprette advarsler.", + "Your IP is not authorized to create pastes.": "Din IP er ikke autorisert til å opprette dokumenter.", "Trying to shorten a URL that isn't pointing at our instance.": "Prøver å forkorte en URL som ikke peker i vår instans.", - "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "Feil ved å ringe YOURLS. Sannsynligvis et konfigurasjonsproblem, som feil eller mangler, \"apiurl\" eller \"signatur\".", + "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "Feil ved å besøke YOURLS. Sannsynligvis et konfigurasjonsproblem, eksempelvis feil eller mangler, med \"apiurl\" eller \"signatur\".", "Error parsing YOURLS response.": "Feil ved analyse av YOURLS svar.", "This secret message can only be displayed once. Would you like to see it now?": "Denne hemmelige meldingen kan bare vises én gang. Vil du se den nå?", "Yes, see it": "Ja, se det", From ab9d9416d9181d4fbd35ad927cf2a526a8d391f8 Mon Sep 17 00:00:00 2001 From: MickGe <59394233+MickGe@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:49:00 +0100 Subject: [PATCH 005/501] fix: responsive long url in plaintext --- css/bootstrap/privatebin.css | 4 ++++ css/bootstrap5/privatebin.css | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css index 74ea788a..8daa5f53 100644 --- a/css/bootstrap/privatebin.css +++ b/css/bootstrap/privatebin.css @@ -87,6 +87,10 @@ body.loading { word-wrap: break-word; } +#plaintext > a { + word-wrap: break-word; +} + #message { height: 70dvh; } diff --git a/css/bootstrap5/privatebin.css b/css/bootstrap5/privatebin.css index f486869d..0c296890 100644 --- a/css/bootstrap5/privatebin.css +++ b/css/bootstrap5/privatebin.css @@ -32,6 +32,10 @@ word-wrap: break-word; } +#plaintext > a { + word-wrap: break-word; +} + #message { height: 70dvh; } From c9067f1f23bc89a942b9e4b3031e10e692aa93a4 Mon Sep 17 00:00:00 2001 From: MickGe <59394233+MickGe@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:46:44 +0100 Subject: [PATCH 006/501] Update css/bootstrap/privatebin.css --- css/bootstrap/privatebin.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/bootstrap/privatebin.css b/css/bootstrap/privatebin.css index 8daa5f53..b85d2cc9 100644 --- a/css/bootstrap/privatebin.css +++ b/css/bootstrap/privatebin.css @@ -87,7 +87,7 @@ body.loading { word-wrap: break-word; } -#plaintext > a { +#pastelink > a, #plaintext a, { word-wrap: break-word; } From 390e268bb0dc090d809aafdd4cb8268bed28564b Mon Sep 17 00:00:00 2001 From: MickGe <59394233+MickGe@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:46:54 +0100 Subject: [PATCH 007/501] Update css/bootstrap5/privatebin.css --- css/bootstrap5/privatebin.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/bootstrap5/privatebin.css b/css/bootstrap5/privatebin.css index 0c296890..0b80ccf0 100644 --- a/css/bootstrap5/privatebin.css +++ b/css/bootstrap5/privatebin.css @@ -32,7 +32,7 @@ word-wrap: break-word; } -#plaintext > a { +#pastelink > a, #plaintext a, { word-wrap: break-word; } From 7e019c4aaeb9088bffd94bac8affd17a0849b4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E4=B9=8B=E6=9A=87=E6=83=B3?= <53783792+fzxx@users.noreply.github.com> Date: Sat, 23 Nov 2024 10:24:24 +0800 Subject: [PATCH 008/501] Update zh.json Translation --- i18n/zh.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/zh.json b/i18n/zh.json index da1d4e9a..891766de 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -218,7 +218,7 @@ "This secret message can only be displayed once. Would you like to see it now?": "读取粘贴后只能在加载时显示一次。您想现在打开吗?", "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.", - "Start over": "Start over" + "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": "重新开始" } From 544c4d2f5f6757d948821ffa3dee51e48721bffa Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 24 Nov 2024 11:45:46 +0100 Subject: [PATCH 009/501] prototype keyboard trap toggle - needs updating all language files - replicate changes to all templates --- CHANGELOG.md | 1 + i18n/en.json | 6 ++++-- js/dark-mode-switch.js | 2 +- js/privatebin.js | 29 ++++++++++++++++++++++++----- lib/Configuration.php | 2 +- tpl/bootstrap5.php | 14 ++++++++++---- 6 files changed, 41 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 456c6c29..a8f92f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # PrivateBin version history ## 1.7.6 (not yet released) +* CHANGED: Allow toggling tab-key-support using `[Ctrl]+[m]` or `[Esc]` in textarea for keyboard navigation (#1386) ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/i18n/en.json b/i18n/en.json index abc2e80a..9d0eaa25 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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/dark-mode-switch.js b/js/dark-mode-switch.js index 07288ee6..e60bedb5 100644 --- a/js/dark-mode-switch.js +++ b/js/dark-mode-switch.js @@ -68,7 +68,7 @@ } else { delStoredPrettifyTheme() } - const toggle = document.querySelector('#bd-theme') + const toggle = document.getElementById('bd-theme') const theme = getStoredPreferredTheme() setTheme(theme) toggle.checked = (theme === 'dark') diff --git a/js/privatebin.js b/js/privatebin.js index 8167d805..7e07d2ca 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2092,7 +2092,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { { I18n._( $('#pastelink'), - 'Your paste is %s (Hit [Ctrl]+[c] to copy)', + 'Your paste is %s (Hit Ctrl+c to copy)', url, url ); // save newly created element @@ -2394,7 +2394,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { $messagePreview, $messagePreviewParent, $message, - isPreview = false; + isPreview = false, + isTabSupported = true; /** * support input of tab character @@ -2406,9 +2407,14 @@ jQuery.PrivateBin = (function($, RawDeflate) { */ function supportTabs(event) { - const keyCode = event.keyCode || event.which; + // support disabling tab support using [Esc] and [Ctrl]+[m] + if (event.key === 'Escape' || (event.ctrlKey && event.key === 'm')) { + toggleTabSupport(); + document.getElementById('message-tab').checked = isTabSupported; + event.preventDefault(); + } // tab was pressed - if (keyCode === 9) { + else if (isTabSupported && event.key === 'Tab') { // get caret position & selection const val = this.value, start = this.selectionStart, @@ -2422,6 +2428,18 @@ jQuery.PrivateBin = (function($, RawDeflate) { } } + /** + * toggle tab support in message textarea + * + * @name Editor.toggleTabSupport + * @private + * @function + */ + function toggleTabSupport() + { + isTabSupported = !isTabSupported; + } + /** * view the Editor tab * @@ -2599,6 +2617,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // bind events $message.keydown(supportTabs); + $('#message-tab').change(toggleTabSupport); // bind click events to tab switchers (a), and save parents (li) $messageEdit = $('#messageedit').click(viewEditor); @@ -3768,7 +3787,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { /** * Clear the password input in the top navigation - * + * * @name TopNav.clearPasswordInput * @function */ diff --git a/lib/Configuration.php b/lib/Configuration.php index 634209a5..7fca5f52 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-JUj/Sbl/bMHlIoIUT1U9e89JU33fDBxCxLSGxwwaeydBFXOBHyfdF7hwSIjgbPxb4d9CO7CSe4meouTIRMy8Vg==', + 'js/privatebin.js' => 'sha512-V0coVhQkhG/bSJcZAMOoR+9Ztak1hElXiOtcrR4zZYm4MwScgytYHPVeZa6ZVKf+Mxp5TtIvM+NcYixP33Yliw==', '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/bootstrap5.php b/tpl/bootstrap5.php index 22909352..9d85da48 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -88,7 +88,7 @@ endif;
- +
@@ -249,7 +249,7 @@ if ($PASSWORD) : ?> @@ -439,7 +439,13 @@ endif;

 					
 					
-					

+

+

+ + +

From 9028ddbb975e01499b4f72578fe9814df2217d95 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 24 Nov 2024 12:49:21 +0100 Subject: [PATCH 010/501] update all language files & SRI hashes all tests pass, still need to replicate template changes and do manual testing to validate the UX --- i18n/ar.json | 6 ++++-- i18n/bg.json | 6 ++++-- i18n/ca.json | 6 ++++-- i18n/co.json | 6 ++++-- i18n/cs.json | 6 ++++-- i18n/de.json | 6 ++++-- i18n/el.json | 6 ++++-- i18n/es.json | 6 ++++-- i18n/et.json | 6 ++++-- i18n/fi.json | 6 ++++-- i18n/fr.json | 6 ++++-- i18n/he.json | 6 ++++-- i18n/hi.json | 6 ++++-- i18n/hu.json | 6 ++++-- i18n/id.json | 6 ++++-- i18n/it.json | 6 ++++-- i18n/ja.json | 6 ++++-- i18n/jbo.json | 6 ++++-- i18n/ko.json | 6 ++++-- i18n/ku.json | 6 ++++-- i18n/la.json | 6 ++++-- i18n/lt.json | 6 ++++-- i18n/nl.json | 6 ++++-- i18n/no.json | 6 ++++-- i18n/oc.json | 6 ++++-- i18n/pl.json | 6 ++++-- i18n/pt.json | 6 ++++-- i18n/ro.json | 6 ++++-- i18n/ru.json | 6 ++++-- i18n/sk.json | 6 ++++-- i18n/sl.json | 6 ++++-- i18n/sv.json | 6 ++++-- i18n/th.json | 6 ++++-- i18n/tr.json | 6 ++++-- i18n/uk.json | 6 ++++-- i18n/zh.json | 6 ++++-- js/test/PasteStatus.js | 3 +-- lib/Configuration.php | 4 ++-- tpl/yourlsproxy.php | 2 +- 39 files changed, 148 insertions(+), 77 deletions(-) diff --git a/i18n/ar.json b/i18n/ar.json index 66138b38..ac7a4de5 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -151,7 +151,7 @@ "server error or not responding": "خطأ في الخادم أو لا يستجيب", "Could not post comment: %s": "لا يمكن نشر تعليق: %s", "Sending paste…": "يُرسل لصق…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "لصقك هو %s (اضغط على [Ctrl] + [c] للنسخ)", + "Your paste is %s (Hit Ctrl+c to copy)": "لصقك هو %s (اضغط على Ctrl + c للنسخ)", "Delete data": "حذف البيانات", "Could not create paste: %s": "تعذر إنشاء اللصق: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "لا يمكن فك تشفير اللصق: مفتاح فك التشفير مفقود في URL (هل استخدمت معيد توجيه أو أداة تقصير لعناوين URL تزيل جزءًا من عنوان URL؟)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 14194e0c..2c7d682b 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -151,7 +151,7 @@ "server error or not responding": "Грешка в сървъра или не отговаря", "Could not post comment: %s": "Публикуването на коментара Ви беше неуспешно: %s", "Sending paste…": "Изпращане на информацията Ви…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Вашата връзка е %s (Натиснете [Ctrl]+[c] за да копирате)", + "Your paste is %s (Hit Ctrl+c to copy)": "Вашата връзка е %s (Натиснете Ctrl+c за да копирате)", "Delete data": "Изтриване на информацията", "Could not create paste: %s": "Създаването на връзката ви беше неуспешно: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Дешифроването на информацията беше неуспешно: Ключа за декриптиране липсва във връзката (Да не сте използвали услуга за пренасочване или скъсяване на връзката, което би изрязало части от нея?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 fbfb6bb6..3029e919 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "No s'ha pogut publicar el comentari: %s", "Sending paste…": "Enviant paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Esborrar les dades", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "No es pot desxifrar la nota: falta la clau de desxifrat a l'URL (vau utilitzar un adreçament o un escurçador d'URL que elimina part de l'URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 b79964a3..c815237a 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -151,7 +151,7 @@ "server error or not responding": "sbagliu di u servitore o u servitore ùn risponde micca", "Could not post comment: %s": "Ùn si pò micca impustà u cummentu : %s", "Sending paste…": "Inviu di l’appiccicu…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "U vostru appiccicu si trova à l’indirizzu%s (Appughjate [Ctrl]+[c] per cupià u liame)", + "Your paste is %s (Hit Ctrl+c to copy)": "U vostru appiccicu si trova à l’indirizzu%s (Appughjate Ctrl+c per cupià u liame)", "Delete data": "Squassà i dati", "Could not create paste: %s": "Ùn si pò micca creà l’appiccicu : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ùn si pò micca dicifrà l’appiccicu : A chjave di dicifratura hè assente in l’indirizzu. Averiate impiegatu un orientadore d’indirizzu o un riduttore chì ammuzzeghja una parte di l’indirizzu ?", @@ -220,5 +220,7 @@ "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.", - "Start over": "Principià torna" + "Start over": "Principià torna", + "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 b81f0f7c..eea080b5 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -151,7 +151,7 @@ "server error or not responding": "Chyba na serveru nebo server neodpovídá", "Could not post comment: %s": "Nelze odeslat komentář: %s", "Sending paste…": "Odesílání příspěvku…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Váš příspěvek je %s (Stiskněte [Ctrl]+[c] pro zkopírování)", + "Your paste is %s (Hit Ctrl+c to copy)": "Váš příspěvek je %s (Stiskněte Ctrl+c pro zkopírování)", "Delete data": "Odstranit data", "Could not create paste: %s": "Nepodařilo se vytvořit příspěvek: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nepodařilo se dešifrovat příspěvek: V adrese chybí dešifrovací klíč (Nepoužili jste přesměrovač nebo zkracovač URL, který maže části URL?)", @@ -220,5 +220,7 @@ "Dark Mode": "Tmavý režim", "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" + "Start over": "Start over", + "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 ded2841c..6b19ea60 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -151,7 +151,7 @@ "server error or not responding": "Fehler auf dem Server oder keine Antwort vom Server", "Could not post comment: %s": "Konnte Kommentar nicht senden: %s", "Sending paste…": "Sende Paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Dein Text ist unter %s zu finden (Drücke [Strg]+[c] um den Link zu kopieren)", + "Your paste is %s (Hit Ctrl+c to copy)": "Dein Text ist unter %s zu finden (Drücke Strg+c um den Link zu kopieren)", "Delete data": "Lösche Daten", "Could not create paste: %s": "Text konnte nicht erstellt werden: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Konnte Paste nicht entschlüsseln: Der Schlüssel fehlt in der Adresse (Hast du eine Umleitung oder einen URL-Verkürzer benutzt, der Teile der Adresse entfernt?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Neuen Text erstellen" + "Start over": "Neuen Text erstellen", + "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 07f81d7a..ba400ef6 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -151,7 +151,7 @@ "server error or not responding": "Πρόβλημα του διακομιστή ή δεν υπάρχει απάντηση", "Could not post comment: %s": "Δεν ήταν δυνατή η δημοσίευση του σχολίου: %s", "Sending paste…": "Η επικόλληση αποστέλλεται…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Η επικόλλησή σας είναι %s (Πληκτρολογήστε [Ctrl]+[c] για αντιγραφή)", + "Your paste is %s (Hit Ctrl+c to copy)": "Η επικόλλησή σας είναι %s (Πληκτρολογήστε Ctrl+c για αντιγραφή)", "Delete data": "Διαγραφή δεδομένων", "Could not create paste: %s": "Δεν ήταν δυνατή η δημιουργία επικόλλησης: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Δεν ήταν δυνατή η αποκρυπτογράφηση της επικόλλησης: Το κλειδί αποκρυπτογράφησης λείπει από τον σύνδεσμο (Μήπως χρησιμοποιήσατε ανακατεύθυνση συνδέσμου ή υπηρεσία συντόμευσης συνδέσμου;)", @@ -220,5 +220,7 @@ "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. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", - "Start over": "Start over" + "Start over": "Start over", + "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 40b63dfb..b6eba892 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -151,7 +151,7 @@ "server error or not responding": "Error del servidor o el servidor no responde", "Could not post comment: %s": "No fue posible publicar comentario: %s", "Sending paste…": "Enviando \"paste\"…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Su texto está en %s (Presione [Ctrl]+[c] para copiar)", + "Your paste is %s (Hit Ctrl+c to copy)": "Su texto está en %s (Presione Ctrl+c para copiar)", "Delete data": "Eliminar datos", "Could not create paste: %s": "No fue posible crear el archivo: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "No es posible descifrar el documento: Falta la clave de descifrado en la URL (¿Utilizó un redirector o un acortador de URL que quite parte de la URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 3d21e4fe..07a79ffa 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -151,7 +151,7 @@ "server error or not responding": "serveri viga või ei vasta", "Could not post comment: %s": "Ei suutnud kommentaari postitada: %s", "Sending paste…": "Kleepe saatmine…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Sinu kleebe on %s (Kopeerimiseks vajuta [Ctrl]+[c])", + "Your paste is %s (Hit Ctrl+c to copy)": "Sinu kleebe on %s (Kopeerimiseks vajuta Ctrl+c)", "Delete data": "Kustuta andmed", "Could not create paste: %s": "Ei suutnud kleebet luua: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ei suutnud kleebet dekrüpteerida: Dekrüpteerimisvõti on URL-ist puudu (Kas kasutasid ümbersuunajat või URL-i lühendajat, mis eemaldab osa URL-ist?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 de5742a4..2452ea0a 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -151,7 +151,7 @@ "server error or not responding": "palvelinvirhe tai palvelin ei vastaa", "Could not post comment: %s": "Kommenttia ei voitu lähettää: %s", "Sending paste…": "Lähetetään pastea…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Pastesi on %s (Paina [Ctrl]+[c] kopioidaksesi)", + "Your paste is %s (Hit Ctrl+c to copy)": "Pastesi on %s (Paina Ctrl+c kopioidaksesi)", "Delete data": "Poista data", "Could not create paste: %s": "Pastea ei voitu luoda: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Pastea ei voitu purkaa: Purkausavain puuttuu URL:stä (Käytitkö uudelleenohjaajaa tai URL-lyhentäjää joka poistaa osan URL:stä?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 d8b00b96..ebf2dfe4 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -151,7 +151,7 @@ "server error or not responding": "Le serveur ne répond pas ou a rencontré une erreur", "Could not post comment: %s": "Impossible de poster le commentaire : %s", "Sending paste…": "Envoi du paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Votre paste est disponible à l'adresse %s (Appuyez sur [Ctrl]+[c] pour copier)", + "Your paste is %s (Hit Ctrl+c to copy)": "Votre paste est disponible à l'adresse %s (Appuyez sur Ctrl+c pour copier)", "Delete data": "Supprimer les données du paste", "Could not create paste: %s": "Impossible de créer le paste : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Impossible de déchiffrer le paste : Clé de déchiffrement manquante dans l'URL (Avez-vous utilisé un redirecteur ou un site de réduction d'URL qui supprime une partie de l'URL ?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Recommencer" + "Start over": "Recommencer", + "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 b32f3b8e..b5a5f00f 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -151,7 +151,7 @@ "server error or not responding": "שגיאת שרת או שהשרת לא מגיב", "Could not post comment: %s": "לא ניתן לפרסם תגובה: %s", "Sending paste…": "ההדבקה נשלחת…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "ההדבקה שלך היא %s (יש ללחוץ [Ctrl]+[c] כדי להעתיק)", + "Your paste is %s (Hit Ctrl+c to copy)": "ההדבקה שלך היא %s (יש ללחוץ Ctrl+c כדי להעתיק)", "Delete data": "מחיקת נתונים", "Could not create paste: %s": "לא ניתן ליצור הדבקה: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "לא ניתן לפענח הדבקה: מפתח הפענוח חסר בכתובת (השתמשת במערכת הפנייה או מקצר כתובות שחותכים חלק מהכתובת?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 abc2e80a..9d0eaa25 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 ed652a53..7eca7642 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -151,7 +151,7 @@ "server error or not responding": "A szerveren hiba lépett fel vagy nem válaszol.", "Could not post comment: %s": "Nem tudtuk beküldeni a hozzászólást: %s", "Sending paste…": "Bejegyzés elküldése...", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "A bejegyzésed a %s címen elérhető. [Ctrl]+[c]-vel tudod vágólapra másolni.", + "Your paste is %s (Hit Ctrl+c to copy)": "A bejegyzésed a %s címen elérhető. Ctrl+c-vel tudod vágólapra másolni.", "Delete data": "Adat törlése", "Could not create paste: %s": "Nem tudtuk létrehozni a bejegyzést: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nem tudjuk visszafejteni a bejegyzést: a dekódoláshoz szükséges kulcs hiányzik a címből. Talán URL rövidítőt használtál ami kivágta azt belőle?", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 62f94a98..fd22eb8f 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -151,7 +151,7 @@ "server error or not responding": "kesalahan server atau server tidak merespon", "Could not post comment: %s": "Tidak dapat memposting komentar: %s", "Sending paste…": "Mengirim paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Paste Anda adalah %s(Tekan [Ctrl]+[c] untuk menyalin)", + "Your paste is %s (Hit Ctrl+c to copy)": "Paste Anda adalah %s(Tekan Ctrl+c untuk menyalin)", "Delete data": "Hapus data", "Could not create paste: %s": "Tidak dapat membuat paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Tidak dapat mendekripsi paste: Kunci dekripsi tidak ada di URL (Apakah Anda menggunakan redirector atau penyingkat URL yang menghapus bagian dari URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 217a779c..7c508d1f 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -151,7 +151,7 @@ "server error or not responding": "errore o mancata risposta dal server", "Could not post comment: %s": "Impossibile inviare il commento: %s", "Sending paste…": "Messaggio in fase di invio…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Il tuo messaggio è qui: %s (Premi [Ctrl]+[c] (Windows) o [Cmd]+[c] (Mac) per copiare il link)", + "Your paste is %s (Hit Ctrl+c to copy)": "Il tuo messaggio è qui: %s (Premi Ctrl+c (Windows) o [Cmd]+[c] (Mac) per copiare il link)", "Delete data": "Cancella i dati", "Could not create paste: %s": "Non riesco a creare il messaggio: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Non riesco a decifrare il messaggio: manca la chiave di decifrazione nell'URL (La chiave è parte integrante dell'URL. Per caso hai usato un Redirector o un altro servizio che ha rimosso una parte dell'URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Ricominciare" + "Start over": "Ricominciare", + "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 528097d5..d233810b 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -151,7 +151,7 @@ "server error or not responding": "サーバーエラーまたは応答しません", "Could not post comment: %s": "コメントを投稿できませんでした:%s", "Sending paste…": "ペーストを送信しています…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "ペーストは%sです(コピーするには[Ctrl]+[c]を押してください)", + "Your paste is %s (Hit Ctrl+c to copy)": "ペーストは%sです(コピーするにはCtrl+cを押してください)", "Delete data": "データを削除", "Could not create paste: %s": "ペーストを作成できませんでした:%s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "ペーストを復号化できません:復号化キーがURLにありません(URLの一部を削除するリダイレクト機能またはURLの短縮アプリケーションを使いましたか?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 86f1d983..3de3ce47 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 abc2e80a..9d0eaa25 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 11b87e66..cc0bc7b9 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 5ee106fd..62bdf473 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 3bbf0745..30e904b6 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -151,7 +151,7 @@ "server error or not responding": "serverio klaida arba jis neatsako", "Could not post comment: %s": "Nepavyko paskelbti komentaro: %s", "Sending paste…": "Siunčiamas įdėjimas…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Jūsų įdėjimas yra %s (Paspauskite [Vald]+[c] norėdami nukopijuoti)", + "Your paste is %s (Hit Ctrl+c to copy)": "Jūsų įdėjimas yra %s (Paspauskite Vald+c norėdami nukopijuoti)", "Delete data": "Ištrinti duomenis", "Could not create paste: %s": "Nepavyko sukurti įdėjimo: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nepavyksta iššifruoti įdėjimo: URL adrese trūksta iššifravimo rakto (Ar naudojote peradresavimo ar URL trumpinimo įrankį, kuris pašalina URL dalį?)", @@ -220,5 +220,7 @@ "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ę.", - "Start over": "Start over" + "Start over": "Start over", + "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 39762f6e..ff63d406 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -151,7 +151,7 @@ "server error or not responding": "Serverfout of server reageert niet", "Could not post comment: %s": "Kon het commentaar niet plaatsen: %s", "Sending paste…": "Paste verzenden…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Je paste is %s (Druk [Ctrl]+[c] om te kopiëren)", + "Your paste is %s (Hit Ctrl+c to copy)": "Je paste is %s (Druk Ctrl+c om te kopiëren)", "Delete data": "Gegevens wissen", "Could not create paste: %s": "Kon de paste niet aanmaken: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Kon de paste niet decoderen: Decoderingssleutel ontbreekt in URL (Heb je een doorverwijzer of een URL-verkorter gebruikt die een deel van de URL verwijdert?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 e04be3ca..fc4bc9ec 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -151,7 +151,7 @@ "server error or not responding": "tjener feilet eller svarer ikke", "Could not post comment: %s": "Kunne ikke sende kommentar: %s", "Sending paste…": "Sender innlegg…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Ditt innlegg er %s (Trykk [Ctrl]+[c] for å kopiere)", + "Your paste is %s (Hit Ctrl+c to copy)": "Ditt innlegg er %s (Trykk Ctrl+c for å kopiere)", "Delete data": "Slett data", "Could not create paste: %s": "Kunne ikke opprette innlegg: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Kan ikke dekryptere innlegg: Dekrypteringsnøkkelen mangler i adressen (Har du bruket en redirector eller en URL forkorter som fjerner en del av addressen?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 d863f283..df16f2e9 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -151,7 +151,7 @@ "server error or not responding": "lo servidor respond pas o a rescontrat una error", "Could not post comment: %s": "Impossible de mandar lo comentari : %s", "Sending paste…": "Mandadís del tèxte…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Vòstre tèxte es disponible a l’adreça %s (Picatz sus [Ctrl]+[c] per copiar)", + "Your paste is %s (Hit Ctrl+c to copy)": "Vòstre tèxte es disponible a l’adreça %s (Picatz sus Ctrl+c per copiar)", "Delete data": "Supprimir las donadas del tèxte", "Could not create paste: %s": "Impossible de crear lo tèxte : %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Impossible de deschifrar lo tèxte : clau de deschiframent absenta de l’URL (Avètz utilizat un redirector o un site de reduccion d’URL que suprimís una partida de l’URL ?)", @@ -220,5 +220,7 @@ "Dark Mode": "Mòde escur", "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" + "Start over": "Start over", + "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 616ec987..2104e7ce 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -151,7 +151,7 @@ "server error or not responding": "błąd serwera lub brak odpowiedzi", "Could not post comment: %s": "Nie udało się wysłać komentarza: %s", "Sending paste…": "Wysyłanie wklejki…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Twoja wklejka to %s (wciśnij [Ctrl]+[c] aby skopiować)", + "Your paste is %s (Hit Ctrl+c to copy)": "Twoja wklejka to %s (wciśnij Ctrl+c aby skopiować)", "Delete data": "Skasuj dane", "Could not create paste: %s": "Nie udało się utworzyć wklejki: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nie udało się odszyfrować wklejki - brak klucza deszyfrującego w adresie (użyłeś skracacza linków, który ucina część adresu?)", @@ -220,5 +220,7 @@ "Dark Mode": "Ciemny motyw", "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" + "Start over": "Start over", + "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 2cb3b7a0..13779f47 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -151,7 +151,7 @@ "server error or not responding": "Servidor em erro ou não responsivo", "Could not post comment: %s": "Não foi possível publicar o comentário: %s", "Sending paste…": "Enviando cópia…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Sua cópia é %s (Pressione [Ctrl]+[c] para copiar)", + "Your paste is %s (Hit Ctrl+c to copy)": "Sua cópia é %s (Pressione Ctrl+c para copiar)", "Delete data": "Excluir dados", "Could not create paste: %s": "Não foi possível criar cópia: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Não foi possível decifrar a cópia: chave de decriptografia ausente na URL (Você utilizou um redirecionador ou encurtador de URL que removeu parte dela?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 5e264979..c6b33f36 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -151,7 +151,7 @@ "server error or not responding": "eroare de server sau nu răspunde", "Could not post comment: %s": "Nu s-a putut posta comentariul: %s", "Sending paste…": "Se trimite paste-ul…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Paste-ul dvs. este %s (Apăsați [Ctrl]+[c] pentru a copia)", + "Your paste is %s (Hit Ctrl+c to copy)": "Paste-ul dvs. este %s (Apăsați Ctrl+c pentru a copia)", "Delete data": "Ștergeți datele", "Could not create paste: %s": "Nu s-a putut crea paste-ul: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nu s-a putut decripta paste-ul: Cheia de decriptare lipsește din URL (Ați folosit un redirector sau un scurtător de URL care a tăiat o parte din URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 387ec8f4..2af27f65 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -151,7 +151,7 @@ "server error or not responding": "ошибка сервера или нет ответа", "Could not post comment: %s": "Не удалось опубликовать комментарий: %s", "Sending paste…": "Отправка записи…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Ссылка на запись %s (Нажмите [Ctrl]+[c], чтобы скопировать ссылку)", + "Your paste is %s (Hit Ctrl+c to copy)": "Ссылка на запись %s (Нажмите Ctrl+c, чтобы скопировать ссылку)", "Delete data": "Удалить запись", "Could not create paste: %s": "Не удалось опубликовать запись: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Невозможно расшифровать запись: Ключ расшифровки отсутствует в ссылке (Может быть, вы используете сокращатель ссылок, который удаляет часть ссылки?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 6ed38c68..c566c343 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -151,7 +151,7 @@ "server error or not responding": "chyba servera alebo server neodpovedá", "Could not post comment: %s": "Nepodarilo sa pridať komentár: %s", "Sending paste…": "Odosiela sa príspevok…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Váš príspevok je %s (skopírujte stlačením [Ctrl]+[c])", + "Your paste is %s (Hit Ctrl+c to copy)": "Váš príspevok je %s (skopírujte stlačením Ctrl+c)", "Delete data": "Odstrániť dáta", "Could not create paste: %s": "Nepodarilo sa vytvoriť príspevok: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Nie je možné dešifrovať príspevok: V URL adrese chýba dešifrovací kľúč (Použili ste presmerovač alebo skracovač adresy, ktorý odstráni časť adresy URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 987724ec..d6b0d11c 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -151,7 +151,7 @@ "server error or not responding": "napaka na strežniku, ali pa se strežnik ne odziva", "Could not post comment: %s": "Komentarja ni bilo mogoče objaviti : %s", "Sending paste…": "Pošiljam prilepek…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Tvoj prilepek je dostopen na naslovu: %s (Pritisni [Ctrl]+[c] ali [Cmd] + [c] in skopiraj)", + "Your paste is %s (Hit Ctrl+c to copy)": "Tvoj prilepek je dostopen na naslovu: %s (Pritisni Ctrl+c ali [Cmd] + [c] in skopiraj)", "Delete data": "Izbriši podatke", "Could not create paste: %s": "Ne morem ustvariti prilepka: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Ne morem odkodirati prilepka: V URL-ju manjka ključ (A si uporabil krajšalnik URL-jev, ki odstrani del URL-ja?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 9bd57df9..c87a2d40 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -151,7 +151,7 @@ "server error or not responding": "server error or not responding", "Could not post comment: %s": "Could not post comment: %s", "Sending paste…": "Sending paste…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Your paste is %s (Hit [Ctrl]+[c] to copy)", + "Your paste is %s (Hit Ctrl+c to copy)": "Your paste is %s (Hit Ctrl+c to copy)", "Delete data": "Delete data", "Could not create paste: %s": "Could not create paste: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 ddebf39f..eaa2bde1 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -151,7 +151,7 @@ "server error or not responding": "เซิร์ฟเวอร์มีข้อผิดพลาดหรือไม่ตอบสนอง", "Could not post comment: %s": "ไม่สามารถส่งความคิดเห็นได้: %s", "Sending paste…": "กำลังส่งข้อมูล…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "การฝากโค้ดของคุณอยู่ที่ %s (กดปุ่ม [Ctrl]+[c] เพื่อคัดลอก)", + "Your paste is %s (Hit Ctrl+c to copy)": "การฝากโค้ดของคุณอยู่ที่ %s (กดปุ่ม Ctrl+c เพื่อคัดลอก)", "Delete data": "ลบข้อมูล", "Could not create paste: %s": "ไม่สามารถสร้างข้อมูลการฝากโค้ดได้: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "ไม่สามารถถอดรหัสข้อมูลการฝากโค้ดได้: คีย์ถอดรหัสที่อยู่ใน URL หายไป (คุณได้ใช้ตัวเปลี่ยนเส้นทางหรือตัวย่อ URL ที่มีการตัดส่วนของ URL ออกหรือไม่)", @@ -220,5 +220,7 @@ "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.", - "Start over": "Start over" + "Start over": "Start over", + "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 eb813269..26abcd54 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -151,7 +151,7 @@ "server error or not responding": "sunucu hatası veya yanıt vermiyor", "Could not post comment: %s": "Yorum paylaşılamadı: %s", "Sending paste…": "Yazı gönderiliyor…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Yazınız: %s ([Ctrl]+[c] tuşlarına basarak kopyalayın.)", + "Your paste is %s (Hit Ctrl+c to copy)": "Yazınız: %s (Ctrl+c tuşlarına basarak kopyalayın.)", "Delete data": "Veriyi sil", "Could not create paste: %s": "Yazı oluşturulamadı: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Yazı şifresi çözülemedi, çözme anahtarı URL'de bulunamadı. (Buraya bir yönlendirici veya URL kısaltıcı kullanarak gelmiş olabilirsiniz.)", @@ -220,5 +220,7 @@ "Dark Mode": "Koyu Mod", "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" + "Start over": "Baştan başla", + "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 9b1f2970..cea58d28 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -151,7 +151,7 @@ "server error or not responding": "помилка на сервері чи немає відповіді", "Could not post comment: %s": "Не вдалося опублікувати коментар: %s", "Sending paste…": "Відправка допису…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "Посилання на допис %s (Тисніть [Ctrl]+[c], щоб скопіювати посилання)", + "Your paste is %s (Hit Ctrl+c to copy)": "Посилання на допис %s (Тисніть Ctrl+c, щоб скопіювати посилання)", "Delete data": "Видалити допис", "Could not create paste: %s": "Не вдалося опублікувати допис: %s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "Неможливо розшифрувати запис: Ключ дешифрування відсутній в посиланні (Можливо, ви використовуєте скорочувач посилань, що видаляє частину посилання?)", @@ -220,5 +220,7 @@ "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. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", - "Start over": "Start over" + "Start over": "Start over", + "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 891766de..58b030e8 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -151,7 +151,7 @@ "server error or not responding": "服务器错误或无回应", "Could not post comment: %s": "无法发送评论: %s", "Sending paste…": "粘贴内容提交中…", - "Your paste is %s (Hit [Ctrl]+[c] to copy)": "您粘贴内容的链接是 %s (按下 [Ctrl]+[C] 以复制)", + "Your paste is %s (Hit Ctrl+c to copy)": "您粘贴内容的链接是 %s (按下 Ctrl+c 以复制)", "Delete data": "删除数据", "Could not create paste: %s": "无法创建粘贴:%s", "Cannot decrypt paste: Decryption key missing in URL (Did you use a redirector or an URL shortener which strips part of the URL?)": "无法解密粘贴:URL中缺失解密密钥(是否使用了重定向或者短链接导致密钥丢失?)", @@ -220,5 +220,7 @@ "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。请使用其他浏览器查看此粘贴。", - "Start over": "重新开始" + "Start over": "重新开始", + "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/test/PasteStatus.js b/js/test/PasteStatus.js index a233bb48..2ade56b3 100644 --- a/js/test/PasteStatus.js +++ b/js/test/PasteStatus.js @@ -155,7 +155,7 @@ describe('PasteStatus', function () { '\t\tPrivateBin\n' + '\t\n' + '\t\n' + - '\t\t

Your paste is ' + shortUrlString + ' (Hit [Ctrl]+[c] to copy)

\n' + + '\t\t

Your paste is ' + shortUrlString + ' (Hit Ctrl+c to copy)

\n' + '\t\n' + '', clean = jsdom(); @@ -255,4 +255,3 @@ describe('PasteStatus', function () { ); }); }); - diff --git a/lib/Configuration.php b/lib/Configuration.php index 7fca5f52..9c2b16a1 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -103,12 +103,12 @@ class Configuration 'js/base64-1.7.js' => 'sha512-JdwsSP3GyHR+jaCkns9CL9NTt4JUJqm/BsODGmYhBcj5EAPKcHYh+OiMfyHbcDLECe17TL0hjXADFkusAqiYgA==', 'js/bootstrap-3.4.1.js' => 'sha512-oBTprMeNEKCnqfuqKd6sbvFzmFQtlXS3e0C/RGFV0hD6QzhHV+ODfaQbAlmY6/q0ubbwlAM/nCJjkrgA3waLzg==', 'js/bootstrap-5.3.3.js' => 'sha512-in2rcOpLTdJ7/pw5qjF4LWHFRtgoBDxXCy49H4YGOcVdGiPaQucGIbOqxt1JvmpvOpq3J/C7VTa0FlioakB2gQ==', - 'js/dark-mode-switch.js' => 'sha512-CCbdHdeWDbDO7aqFFmhgnvFESzaILHbUYmbhNjTpcjyO/XYdouQ9Pw8W9rpV8oJT1TsK5FbwSHU1oazmnb7BWA==', + 'js/dark-mode-switch.js' => 'sha512-BhY7dNU14aDN5L+muoUmA66x0CkYUWkQT0nxhKBLP/o2d7jE025+dvWJa4OiYffBGEFgmhrD/Sp+QMkxGMTz2g==', 'js/jquery-3.7.1.js' => 'sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==', '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-V0coVhQkhG/bSJcZAMOoR+9Ztak1hElXiOtcrR4zZYm4MwScgytYHPVeZa6ZVKf+Mxp5TtIvM+NcYixP33Yliw==', + 'js/privatebin.js' => 'sha512-Tit/JkrOoSGSvbDmnWmvK7utnjzHaErYPRrQYlGf0PEQZPYWFVYCKkV+HkNJzFXAXKWqqpA8b16TU38R/wgpRg==', '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/yourlsproxy.php b/tpl/yourlsproxy.php index bb63d6ce..868b6ac2 100644 --- a/tpl/yourlsproxy.php +++ b/tpl/yourlsproxy.php @@ -13,7 +13,7 @@ use PrivateBin\I18n; -

%s (Hit [Ctrl]+[c] to copy)', $SHORTURL, $SHORTURL); ?>

+

%s (Hit Ctrl+c to copy)', $SHORTURL, $SHORTURL); ?>

From c7195aaf9a0f19719cf32959ac63a4d969af1269 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 24 Nov 2024 15:42:38 +0100 Subject: [PATCH 011/501] replicate template changes, fix bugs - fixes QR code height introducing space even when hidden in page layout - fix modals in bootstrap 5 (modal syntax changed heavily, no longer jQuery integrated) - hide and show tab-toggle depending on application state - don't encode HTML entities in translated messages containing kbd tags (in addition to links) --- css/bootstrap5/privatebin.css | 4 ++ css/common.css | 1 - css/privatebin.css | 2 +- js/privatebin.js | 70 +++++++++++++++++++++++++++-------- lib/Configuration.php | 2 +- lib/I18n.php | 13 +++++-- tpl/bootstrap.php | 6 +++ tpl/bootstrap5.php | 8 ++-- tpl/page.php | 4 ++ 9 files changed, 84 insertions(+), 26 deletions(-) diff --git a/css/bootstrap5/privatebin.css b/css/bootstrap5/privatebin.css index 211cfbd2..acbcf63d 100644 --- a/css/bootstrap5/privatebin.css +++ b/css/bootstrap5/privatebin.css @@ -18,6 +18,10 @@ --bs-dropdown-min-width: 23rem; } +pre { + margin-bottom: 0; +} + [data-bs-theme=light] pre, [data-bs-theme=light] .card { background-color: RGBA(var(--bs-light-rgb), var(--bs-bg-opacity, 1)); } diff --git a/css/common.css b/css/common.css index 5a488d54..5f032aed 100644 --- a/css/common.css +++ b/css/common.css @@ -53,7 +53,6 @@ #qrcode-display { width: 200px; - height: 200px; margin: auto; } diff --git a/css/privatebin.css b/css/privatebin.css index 77824fb6..291f98f2 100644 --- a/css/privatebin.css +++ b/css/privatebin.css @@ -125,7 +125,7 @@ h3.title { #pasteresult button { margin-left: 11px; } -#toolbar, #status { margin-bottom: 5px; } +#message, #plaintext, #prettymessage, #toolbar, #status { margin-bottom: 5px; } #copyhint { color: #666; font-size: 0.85em } diff --git a/js/privatebin.js b/js/privatebin.js index 7e07d2ca..d11b2355 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2257,7 +2257,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { password = $passwordDecrypt.val(); // hide modal - $passwordModal.modal('hide'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($passwordModal[0])).hide(); + } else { + $passwordModal.modal('hide'); + } PasteDecrypter.run(); } @@ -2278,7 +2282,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { const $loadconfirmClose = $loadconfirmmodal.find('.close'); $loadconfirmClose.off('click.close'); $loadconfirmClose.on('click.close', Controller.newPaste); - $loadconfirmmodal.modal('show'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($loadconfirmmodal[0])).show(); + } else { + $loadconfirmmodal.modal('show'); + } } else { if (window.confirm( I18n._('This secret message can only be displayed once. Would you like to see it now?') @@ -2300,11 +2308,18 @@ jQuery.PrivateBin = (function($, RawDeflate) { { // show new bootstrap method (if available) if ($passwordModal.length !== 0) { - $passwordModal.modal({ - backdrop: 'static', - keyboard: false - }); - $passwordModal.modal('show'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($passwordModal[0]), { + backdrop: 'static', + keyboard: false + }).show(); + } else { + $passwordModal.modal({ + backdrop: 'static', + keyboard: false + }); + $passwordModal.modal('show'); + } // focus password input $passwordDecrypt.focus(); // then re-focus it, when modal causes it to loose focus again @@ -2393,6 +2408,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { $messageEditParent, $messagePreview, $messagePreviewParent, + $messageTab, + $messageTabParent, $message, isPreview = false, isTabSupported = true; @@ -2410,7 +2427,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // support disabling tab support using [Esc] and [Ctrl]+[m] if (event.key === 'Escape' || (event.ctrlKey && event.key === 'm')) { toggleTabSupport(); - document.getElementById('message-tab').checked = isTabSupported; + $messageTab[0].checked = isTabSupported; event.preventDefault(); } // tab was pressed @@ -2462,6 +2479,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // reshow input $message.removeClass('hidden'); + $messageTabParent.removeClass('hidden'); me.focusInput(); @@ -2494,6 +2512,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // hide input as now preview is shown $message.addClass('hidden'); + $messageTabParent.addClass('hidden'); // show preview PasteViewer.setText($message.val()); @@ -2552,6 +2571,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.show = function() { $message.removeClass('hidden'); + $messageTabParent.removeClass('hidden'); $editorTabs.removeClass('hidden'); }; @@ -2564,6 +2584,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.hide = function() { $message.addClass('hidden'); + $messageTabParent.addClass('hidden'); $editorTabs.addClass('hidden'); }; @@ -2603,7 +2624,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { }; /** - * init status manager + * init editor * * preloads jQuery elements * @@ -2614,10 +2635,12 @@ jQuery.PrivateBin = (function($, RawDeflate) { { $editorTabs = $('#editorTabs'); $message = $('#message'); + $messageTab = $('#messagetab'); + $messageTabParent = $messageTab.parent(); // bind events $message.keydown(supportTabs); - $('#message-tab').change(toggleTabSupport); + $messageTab.change(toggleTabSupport); // bind click events to tab switchers (a), and save parents (li) $messageEdit = $('#messageedit').click(viewEditor); @@ -2638,7 +2661,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { const PasteViewer = (function () { const me = {}; - let $placeholder, + let $messageTabParent, + $placeholder, $prettyMessage, $prettyPrint, $plainText, @@ -2718,6 +2742,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { } // otherwise hide the placeholder $placeholder.addClass('hidden'); + $messageTabParent.addClass('hidden'); if (format === 'markdown') { $plainText.removeClass('hidden'); @@ -2856,6 +2881,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { */ me.init = function() { + $messageTabParent = $('#messagetab').parent(); $placeholder = $('#placeholder'); $plainText = $('#plaintext'); $prettyMessage = $('#prettymessage'); @@ -3960,8 +3986,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { }); $('#qrcode-display').html(qrCanvas); // only necessary for bootstrap 5, other templates won't have this - if (bootstrap.Tooltip.VERSION) { - $('#qrcodemodal').modal('show'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal('#qrcodemodal')).show(); } } @@ -4054,7 +4080,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { $emailconfirmTimezoneCurrent.off('click.sendEmailCurrentTimezone'); $emailconfirmTimezoneCurrent.on('click.sendEmailCurrentTimezone', () => { const emailBody = templateEmailBody(expirationDateRoundedToSecond.toLocaleString(), isBurnafterreading); - $emailconfirmmodal.modal('hide'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($emailconfirmmodal[0])).hide(); + } else { + $emailconfirmmodal.modal('hide'); + } triggerEmailSend(emailBody); }); $emailconfirmTimezoneUtc.off('click.sendEmailUtcTimezone'); @@ -4064,10 +4094,18 @@ jQuery.PrivateBin = (function($, RawDeflate) { // we don't use Date.prototype.toUTCString() because we would like to avoid GMT { timeZone: 'UTC', dateStyle: 'long', timeStyle: 'long' } ), isBurnafterreading); - $emailconfirmmodal.modal('hide'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($emailconfirmmodal[0])).hide(); + } else { + $emailconfirmmodal.modal('hide'); + } triggerEmailSend(emailBody); }); - $emailconfirmmodal.modal('show'); + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + (new bootstrap.Modal($emailconfirmmodal[0])).show(); + } else { + $emailconfirmmodal.modal('show'); + } } else { triggerEmailSend(templateEmailBody(null, isBurnafterreading)); } diff --git a/lib/Configuration.php b/lib/Configuration.php index 9c2b16a1..010d7aa1 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-Tit/JkrOoSGSvbDmnWmvK7utnjzHaErYPRrQYlGf0PEQZPYWFVYCKkV+HkNJzFXAXKWqqpA8b16TU38R/wgpRg==', + 'js/privatebin.js' => 'sha512-rbfSVRLvLB7zcmnDGOopePCL0BUEDH10Yd1sZig/l44MaxQGcMaAG/T5Zeln3it/0LxMOIujZV/By+0ShhwysQ==', '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/I18n.php b/lib/I18n.php index 3d1e8029..3737bc46 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -127,12 +127,19 @@ class I18n } else { $args[0] = self::$_translations[$messageId]; } - // encode any non-integer arguments and the message ID, if it doesn't contain a link + // encode any non-integer arguments and the message ID, if it doesn't contain a link or keyboard input $argsCount = count($args); for ($i = 0; $i < $argsCount; ++$i) { - if ($i > 0 ? !is_int($args[$i]) : strpos($args[0], '') !== false) { + continue; + } + } else { + if (is_int($args[$i])) { + continue; + } } + $args[$i] = self::encode($args[$i]); } return call_user_func_array('sprintf', $args); } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 6d7b7483..9c8d0aa3 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -584,6 +584,12 @@ endif;

+

+ +

diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 9d85da48..fb28fc55 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -440,10 +440,10 @@ endif;

-

- -

+ +

diff --git a/tpl/page.php b/tpl/page.php index 4f42ebe1..5504ddfe 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -264,6 +264,10 @@ endif; +
+ + +
From 3d59d3da500c6a7276e80fbe2b2c21753846e90b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 24 Nov 2024 16:17:45 +0100 Subject: [PATCH 012/501] change focus order for accessibility tabbing out of the textarea jumps to the "Create" button, then the tab-toggle --- tpl/bootstrap.php | 6 +++--- tpl/bootstrap5.php | 6 +++--- tpl/page.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 9c8d0aa3..a34bcec0 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -567,7 +567,7 @@ if ($isPage) : - @@ -439,9 +439,9 @@ endif;

 					
 					
-					

+

- + diff --git a/tpl/page.php b/tpl/page.php index 5504ddfe..9b8fe408 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -125,7 +125,7 @@ endif;

- + @@ -263,9 +263,9 @@ endif;

 				
- +
- +
From 6587466a9b29a5f2af49d849243e3783cf4ab9ca Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 26 Nov 2024 07:01:34 +0100 Subject: [PATCH 013/501] remove async & ES6 feature detection It requires eval and webcrypto got introduced in older Chrome & Firefox versions, so seems superfluous to keep. --- CHANGELOG.md | 1 + js/legacy.js | 12 ------------ lib/Configuration.php | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 456c6c29..262edc9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # PrivateBin version history ## 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. ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/js/legacy.js b/js/legacy.js index be85f981..922e9a0e 100644 --- a/js/legacy.js +++ b/js/legacy.js @@ -174,18 +174,6 @@ )) { return true; } - - // async & ES6 support - try { - async () => {}; - } catch (e) { - if (e instanceof SyntaxError) { - return true; - } else { - throw e; // throws CSP error - } - } - return false; } diff --git a/lib/Configuration.php b/lib/Configuration.php index 78aa9fe5..9dd7f4f3 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -106,7 +106,7 @@ class Configuration 'js/dark-mode-switch.js' => 'sha512-CCbdHdeWDbDO7aqFFmhgnvFESzaILHbUYmbhNjTpcjyO/XYdouQ9Pw8W9rpV8oJT1TsK5FbwSHU1oazmnb7BWA==', 'js/jquery-3.7.1.js' => 'sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==', 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', - 'js/legacy.js' => 'sha512-p76t5AT6YHgvhG5RqWGOQ6o87aObfYWYwOPHYhhN4KfExVEZJ0/I0D+1daKprxgbL37/gtXxbd1qZx4PIhSU3g==', + 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', 'js/privatebin.js' => 'sha512-JUj/Sbl/bMHlIoIUT1U9e89JU33fDBxCxLSGxwwaeydBFXOBHyfdF7hwSIjgbPxb4d9CO7CSe4meouTIRMy8Vg==', 'js/purify-3.1.7.js' => 'sha512-LegvqULiMtOfboJZw9MpETN/b+xnLRXZI90gG7oIFHW+yAeHmKvRtEUbiMFx2WvUqQoL9XB3gwU+hWXUT0X+8A==', From 652cf0cf26f34e29f2fb373ead49630085cfc52c Mon Sep 17 00:00:00 2001 From: El RIDO Date: Thu, 28 Nov 2024 07:48:27 +0100 Subject: [PATCH 014/501] bump PHP libraries --- CHANGELOG.md | 1 + composer.json | 4 ++-- composer.lock | 12 ++++++------ vendor/composer/installed.php | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 262edc9e..d96eabb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,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 ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/composer.json b/composer.json index d16a562b..10024a08 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "yzalis/identicon": "2.0.0" }, "suggest" : { - "google/cloud-storage" : "1.43.0", - "aws/aws-sdk-php" : "3.325.0" + "google/cloud-storage" : "1.44.0", + "aws/aws-sdk-php" : "3.331.0" }, "require-dev" : { "phpunit/phpunit" : "^9" diff --git a/composer.lock b/composer.lock index 3b298cb5..a72fb37c 100644 --- a/composer.lock +++ b/composer.lock @@ -257,16 +257,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -305,7 +305,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -313,7 +313,7 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 6631bab7..7c68f160 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'privatebin/privatebin', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '365782ebeb864a851a9ece915028f6cac97f8fab', + 'reference' => '1c7d63954642b3852177793c0c17963303484051', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -31,7 +31,7 @@ 'privatebin/privatebin' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '365782ebeb864a851a9ece915028f6cac97f8fab', + 'reference' => '1c7d63954642b3852177793c0c17963303484051', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), From 75ec510f2dfea3d4b2bc92a445f8e9f5971c4e17 Mon Sep 17 00:00:00 2001 From: PrivateBin Translator Bot <72346835+privatebin-translator@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:44:35 +0100 Subject: [PATCH 015/501] New translations en.json (Corsican) --- i18n/co.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/co.json b/i18n/co.json index b79964a3..d590be28 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -168,15 +168,15 @@ "Plain Text": "Testu in chjaru", "Source Code": "Codice di fonte", "Markdown": "Markdown", - "Download attachment": "Scaricà a pezza aghjunta", + "Download attachment": "Scaricà a pezza ghjunta", "Cloned: '%s'": "Duppiatu : « %s »", "The cloned file '%s' was attached to this paste.": "U schedariu duppiatu « %s » hè statu aghjuntu à st’appiccicu.", "Attach a file": "Aghjunghje un schedariu", "alternatively drag & drop a file or paste an image from the clipboard": "in alternanza, sguillà è depone un schedariu o incullà una fiura da u preme’papei", - "File too large, to display a preview. Please download the attachment.": "Schedariu troppu maiò per affissà una fighjulata. Scaricate a pezza aghjunta.", - "Remove attachment": "Caccià a pezza aghjunta", + "File too large, to display a preview. Please download the attachment.": "Schedariu troppu maiò per affissà una fighjulata. Scaricate a pezza ghjunta.", + "Remove attachment": "Caccià a pezza ghjunta", "Your browser does not support uploading encrypted files. Please use a newer browser.": "U vostru navigatore ùn accetta micca l’inviu di i schedarii cifrati. Impiegate un navigatore più recente.", - "Invalid attachment.": "A pezza aghjunta hè inaccettevule.", + "Invalid attachment.": "A pezza ghjunta hè inaccettevule.", "Options": "Ozzioni", "Shorten URL": "Ammuzzà l’indirizzu", "Editor": "Editore", From 7ee6bcafc4887981a5d804cee9cd9da35ed9b2fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:11:25 +0000 Subject: [PATCH 016/501] Bump dawidd6/action-download-artifact from 6 to 7 Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 7. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](https://github.com/dawidd6/action-download-artifact/compare/bf251b5aa9c2f7eeb574a96ee720e24f801b7c11...80620a5d27ce0ae443b965134db88467fc607b43) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-results.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-results.yml b/.github/workflows/test-results.yml index 4e20737d..5254960f 100644 --- a/.github/workflows/test-results.yml +++ b/.github/workflows/test-results.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Download and Extract Artifacts - uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 + uses: dawidd6/action-download-artifact@80620a5d27ce0ae443b965134db88467fc607b43 with: run_id: ${{ github.event.workflow_run.id }} path: artifacts From e92f2ac9ca6fb9557f7cb59f252095e726065820 Mon Sep 17 00:00:00 2001 From: PrivateBin Translator Bot <72346835+privatebin-translator@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:49:56 +0100 Subject: [PATCH 017/501] New translations en.json (Thai) --- i18n/th.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/th.json b/i18n/th.json index ddebf39f..089de3fe 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -217,7 +217,7 @@ "Error parsing YOURLS response.": "เกิดข้อผิดพลาดในการแยกวิเคราะห์การตอบสนองของ YOURLS", "This secret message can only be displayed once. Would you like to see it now?": "This secret message can only be displayed once. Would you like to see it now?", "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.", "Start over": "Start over" From f9094874eb1639a6c6cbb84e118441a6b0d0d42a Mon Sep 17 00:00:00 2001 From: PrivateBin Translator Bot <72346835+privatebin-translator@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:59:49 +0100 Subject: [PATCH 018/501] New translations en.json (Thai) --- i18n/th.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/i18n/th.json b/i18n/th.json index 089de3fe..b088d68f 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -215,10 +215,10 @@ "Trying to shorten a URL that isn't pointing at our instance.": "กำลังพยายามใช้เครื่องมือสร้างลิงก์ย่อ ที่ไม่ได้ชี้ไปที่อินสแตนซ์ของเรา", "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "เกิดข้อผิดพลาดในการเรียก YOURLS อาจเป็นปัญหามาจากการกำหนดค่า เช่น \"apiurl\" หรือ \"signature\" ไม่ถูกต้องหรือขาดหายไป", "Error parsing YOURLS response.": "เกิดข้อผิดพลาดในการแยกวิเคราะห์การตอบสนองของ YOURLS", - "This secret message can only be displayed once. Would you like to see it now?": "This secret message can only be displayed once. Would you like to see it now?", - "Yes, see it": "Yes, see it", + "This secret message can only be displayed once. Would you like to see it now?": "ข้อความลับนี้จะแสดงได้เพียงครั้งเดียวเท่านั้น คุณต้องการดูข้อความนี้ตอนนี้เลยใช่หรือไม่", + "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.", - "Start over": "Start over" + "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": "เริ่มใหม่" } From f7a9631a2fddf2c78bb08a04422010127850bf7f Mon Sep 17 00:00:00 2001 From: PrivateBin Translator Bot <72346835+privatebin-translator@users.noreply.github.com> Date: Thu, 12 Dec 2024 21:29:46 +0100 Subject: [PATCH 019/501] New translations en.json (Ukrainian) --- i18n/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/uk.json b/i18n/uk.json index 9b1f2970..2d7796cb 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -220,5 +220,5 @@ "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. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", - "Start over": "Start over" + "Start over": "Почати знову" } From 15488d3405cfe28d08ca9662456181d48d550fec Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 14 Dec 2024 09:14:44 +0100 Subject: [PATCH 020/501] bump checkout action --- codacy-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codacy-analysis.yml b/codacy-analysis.yml index 9850708b..31d065cd 100644 --- a/codacy-analysis.yml +++ b/codacy-analysis.yml @@ -24,7 +24,7 @@ jobs: steps: # Checkout the repository to the GitHub Actions runner - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis - name: Run Codacy Analysis CLI From be18dcb838d50fd68794b25bc7c883de7fb626eb Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 22 Dec 2024 11:17:34 +0100 Subject: [PATCH 021/501] upgrading DOMpurify library to 3.2.3 --- CHANGELOG.md | 2 +- js/common.js | 2 +- js/purify-3.1.7.js | 2 -- js/purify-3.2.3.js | 2 ++ lib/Configuration.php | 2 +- tpl/bootstrap.php | 2 +- tpl/bootstrap5.php | 2 +- tpl/page.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 js/purify-3.1.7.js create mode 100644 js/purify-3.2.3.js diff --git a/CHANGELOG.md b/CHANGELOG.md index d96eabb1..a0506712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,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 +* CHANGED: Upgrading libraries to: DOMpurify 3.2.3, cloud-storage 1.44.0, aws-sdk-php 3.331.0 ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/js/common.js b/js/common.js index a81dbc82..5ad72afd 100644 --- a/js/common.js +++ b/js/common.js @@ -17,7 +17,7 @@ require('./prettify'); global.prettyPrint = window.PR.prettyPrint; global.prettyPrintOne = window.PR.prettyPrintOne; global.showdown = require('./showdown-2.1.0'); -global.DOMPurify = require('./purify-3.1.7'); +global.DOMPurify = require('./purify-3.2.3'); global.baseX = require('./base-x-4.0.0').baseX; global.Legacy = require('./legacy').Legacy; require('./bootstrap-3.4.1'); diff --git a/js/purify-3.1.7.js b/js/purify-3.1.7.js deleted file mode 100644 index ec61bc61..00000000 --- a/js/purify-3.1.7.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),_=b(RegExp.prototype.test),A=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t/gm),B=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:B,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:X,DOCTYPE_NAME:q,CUSTOM_ELEMENT:$});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.1.7",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:b,Element:R,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=C(j,"cloneNode"),$=C(j,"remove"),ne=C(j,"nextSibling"),oe=C(j,"childNodes"),re=C(j,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:_e}=K;let{IS_ALLOWED_URI:Ae}=K,Ne=null;const be=S({},[...L,...v,...D,...x,...M]);let Se=null;const Re=S({},[...I,...U,...P,...F]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Le=null,ve=!0,De=!0,Oe=!1,xe=!0,ke=!1,Me=!0,Ie=!1,Ue=!1,Pe=!1,Fe=!1,He=!1,ze=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=S({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=S({},[Je,Qe,et],d);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const st=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=w(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?d:f,Ne=E(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,lt):be,Se=E(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,lt):Re,ot=E(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?S(w(Ze),e.ADD_URI_SAFE_ATTR,lt):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?S(w(Ke),e.ADD_DATA_URI_TAGS,lt):Ke,Xe=E(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,lt):qe,Ce=E(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,lt):{},Le=E(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,lt):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,ve=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(De=!1),He&&(Fe=!0),je&&(Ne=S({},M),Se=[],!0===je.html&&(S(Ne,L),S(Se,I)),!0===je.svg&&(S(Ne,v),S(Se,U),S(Se,F)),!0===je.svgFilters&&(S(Ne,D),S(Se,U),S(Se,F)),!0===je.mathMl&&(S(Ne,x),S(Se,P),S(Se,F))),e.ADD_TAGS&&(Ne===be&&(Ne=w(Ne)),S(Ne,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Se===Re&&(Se=w(Se)),S(Se,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&S(Ve,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),S(Xe,e.FORBID_CONTENTS,lt)),Ge&&(Ne["#text"]=!0),Ie&&S(Ne,["html","head","body"]),Ne.table&&(S(Ne,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),ct=e}},pt=S({},["mi","mo","mn","ms","mtext"]),ft=S({},["annotation-xml"]),dt=S({},["title","style","font","a","script"]),ht=S({},[...v,...D,...O]),gt=S({},[...x,...k]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Fe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(Pe)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&tt===et&&(e=''+e+"");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},_t=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof b&&e instanceof b},bt=function(e,t,n){pe[e]&&u(pe[e],(e=>{e.call(o,t,n,ct)}))},St=function(e){let t=null;if(bt("beforeSanitizeElements",e,null),At(e))return Tt(e),!0;const n=lt(e.nodeName);if(bt("uponSanitizeElement",e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(Me&&e.nodeType===Q&&_(/<[/\w]/g,e.data))return Tt(e),!0;if(!Ne[n]||Ce[n]){if(!Ce[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||pt[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&ft[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!ft[o])&&!(t.namespaceURI===Je&&!pt[o])&&!gt[n]&&(dt[n]||!ht[n]):!("application/xhtml+xml"!==it||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt("afterSanitizeElements",e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(De&&!Le[t]&&_(ge,t));else if(ve&&_(Te,t));else if(!Se[t]||Le[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&_(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(_(Ae,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Oe&&!_(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,_e)},Ct=function(e){bt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=lt(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&_(/\/>/i,p)){yt(a,e);continue}ke&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=lt(e.nodeName);if(Rt(f,s,p))if(!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),Me&&_(/((--!?|])>)|<\/(style|title)/i,p))yt(a,e);else{if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),At(e)?Tt(e):m(o.removed)}catch(e){}}}bt("afterSanitizeAttributes",e,null)},Lt=function e(t){let n=null;const o=_t(t);for(bt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)bt("uponSanitizeShadowNode",n,null),St(n)||(n.content instanceof s&&e(n.content),Ct(n));bt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||mt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=lt(e.nodeName);if(!Ne[t]||Ce[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!Ie&&-1===e.indexOf("<"))return ie&&ze?ie.createHTML(e):e;if(n=Et(e),!n)return Fe?null:ze?ae:""}n&&Pe&&Tt(n.firstChild);const c=_t(Ye?e:n);for(;i=c.nextNode();)St(i)||(i.content instanceof s&&Lt(i.content),Ct(i));if(Ye)return e;if(Fe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Se.shadowroot||Se.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(q,n.ownerDocument.doctype.name)&&(m="\n"+m),ke&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&ze?ie.createHTML(m):m},o.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){ct=null,Ue=!1},o.isValidAttribute=function(e,t,n){ct||mt({});const o=lt(e),r=lt(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],p(pe[e],t))},o.removeHook=function(e){if(pe[e])return m(pe[e])},o.removeHooks=function(e){pe[e]&&(pe[e]=[])},o.removeAllHooks=function(){pe={}},o}();return ne})); diff --git a/js/purify-3.2.3.js b/js/purify-3.2.3.js new file mode 100644 index 00000000..4d12880c --- /dev/null +++ b/js/purify-3.2.3.js @@ -0,0 +1,2 @@ +/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e=''+e+"");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne})); diff --git a/lib/Configuration.php b/lib/Configuration.php index 9dd7f4f3..bb348e22 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -109,7 +109,7 @@ class Configuration 'js/legacy.js' => 'sha512-UxW/TOZKon83n6dk/09GsYKIyeO5LeBHokxyIq+r7KFS5KMBeIB/EM7NrkVYIezwZBaovnyNtY2d9tKFicRlXg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', 'js/privatebin.js' => 'sha512-JUj/Sbl/bMHlIoIUT1U9e89JU33fDBxCxLSGxwwaeydBFXOBHyfdF7hwSIjgbPxb4d9CO7CSe4meouTIRMy8Vg==', - 'js/purify-3.1.7.js' => 'sha512-LegvqULiMtOfboJZw9MpETN/b+xnLRXZI90gG7oIFHW+yAeHmKvRtEUbiMFx2WvUqQoL9XB3gwU+hWXUT0X+8A==', + 'js/purify-3.2.3.js' => 'sha512-m8Wa/I//YoYMiIahBxDDwYfTnycl+i2DwH58nR8ps1o4KWqXzF8k1K4qHDgAz2HSQFNCNNKH/Qcbfu/jLOuhuQ==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', 'js/zlib-1.3.1.js' => 'sha512-5bU9IIP4PgBrOKLZvGWJD4kgfQrkTz8Z3Iqeu058mbQzW3mCumOU6M3UVbVZU9rrVoVwaW4cZK8U8h5xjF88eQ==', diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 6d7b7483..8c601452 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -71,7 +71,7 @@ if ($MARKDOWN) : - _scriptTag('js/purify-3.1.7.js', 'async'); ?> + _scriptTag('js/purify-3.2.3.js', 'async'); ?> _scriptTag('js/legacy.js', 'async'); ?> _scriptTag('js/privatebin.js', 'defer'); ?> diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 22909352..7a0e4bb4 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -55,7 +55,7 @@ if ($MARKDOWN) : - _scriptTag('js/purify-3.1.7.js', 'defer'); ?> + _scriptTag('js/purify-3.2.3.js', 'defer'); ?> _scriptTag('js/legacy.js', 'async'); ?> _scriptTag('js/privatebin.js', 'defer'); ?> diff --git a/tpl/page.php b/tpl/page.php index 4f42ebe1..0e844e1f 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -49,7 +49,7 @@ if ($MARKDOWN): - _scriptTag('js/purify-3.1.7.js', 'async'); ?> + _scriptTag('js/purify-3.2.3.js', 'async'); ?> _scriptTag('js/legacy.js', 'async'); ?> _scriptTag('js/privatebin.js', 'defer'); ?> From 21b259b5eb2ede4afe2d5788505b3943fe34fab4 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 22 Dec 2024 12:05:55 +0100 Subject: [PATCH 022/501] bump libraries, document change fixes #1301 --- CHANGELOG.md | 2 +- composer.json | 4 +- composer.lock | 16 +++--- vendor/composer/ClassLoader.php | 96 ++++++++++++++++----------------- vendor/composer/installed.php | 4 +- 5 files changed, 58 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d96eabb1..82ec2d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,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 +* CHANGED: Upgrading libraries to: cloud-storage 1.45.0, aws-sdk-php 3.336.2 ## 1.7.5 (2024-11-16) * ADDED: Allow non persistent SQL connections, if configured (#1394) diff --git a/composer.json b/composer.json index 10024a08..d3afb5f9 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "yzalis/identicon": "2.0.0" }, "suggest" : { - "google/cloud-storage" : "1.44.0", - "aws/aws-sdk-php" : "3.331.0" + "google/cloud-storage" : "1.45.0", + "aws/aws-sdk-php" : "3.336.2" }, "require-dev" : { "phpunit/phpunit" : "^9" diff --git a/composer.lock b/composer.lock index a72fb37c..ec4a2425 100644 --- a/composer.lock +++ b/composer.lock @@ -810,16 +810,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 +830,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 +893,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 +909,7 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:50:18+00:00" + "time": "2024-12-05T13:48:26+00:00" }, { "name": "sebastian/cli-parser", @@ -1937,5 +1937,5 @@ "platform-overrides": { "php": "7.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index a72151c7..7824d8f7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -45,35 +45,34 @@ class ClassLoader /** @var \Closure(string):void */ private static $includeFile; - /** @var ?string */ + /** @var string|null */ private $vendorDir; // PSR-4 /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array[] - * @psalm-var array> + * @var array> */ private $prefixDirsPsr4 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * @var array[] - * @psalm-var array> + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> */ private $prefixesPsr0 = array(); /** - * @var array[] - * @psalm-var array + * @var list */ private $fallbackDirsPsr0 = array(); @@ -81,8 +80,7 @@ class ClassLoader private $useIncludePath = false; /** - * @var string[] - * @psalm-var array + * @var array */ private $classMap = array(); @@ -90,21 +88,20 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var bool[] - * @psalm-var array + * @var array */ private $missingClasses = array(); - /** @var ?string */ + /** @var string|null */ private $apcuPrefix; /** - * @var self[] + * @var array */ private static $registeredLoaders = array(); /** - * @param ?string $vendorDir + * @param string|null $vendorDir */ public function __construct($vendorDir = null) { @@ -113,7 +110,7 @@ class ClassLoader } /** - * @return string[] + * @return array> */ public function getPrefixes() { @@ -125,8 +122,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array> + * @return array> */ public function getPrefixesPsr4() { @@ -134,8 +130,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirs() { @@ -143,8 +138,7 @@ class ClassLoader } /** - * @return array[] - * @psalm-return array + * @return list */ public function getFallbackDirsPsr4() { @@ -152,8 +146,7 @@ class ClassLoader } /** - * @return string[] Array of classname => path - * @psalm-return array + * @return array Array of classname => path */ public function getClassMap() { @@ -161,8 +154,7 @@ class ClassLoader } /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap + * @param array $classMap Class to filename map * * @return void */ @@ -179,24 +171,25 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -205,19 +198,19 @@ class ClassLoader $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -226,9 +219,9 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -236,17 +229,18 @@ class ClassLoader */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -256,18 +250,18 @@ class ClassLoader throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -276,8 +270,8 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories * * @return void */ @@ -294,8 +288,8 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -481,9 +475,9 @@ class ClassLoader } /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. + * Returns the currently registered loaders keyed by their corresponding vendor directories. * - * @return self[] + * @return array */ public static function getRegisteredLoaders() { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 7c68f160..ead63ad4 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'privatebin/privatebin', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '1c7d63954642b3852177793c0c17963303484051', + 'reference' => '15488d3405cfe28d08ca9662456181d48d550fec', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -31,7 +31,7 @@ 'privatebin/privatebin' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '1c7d63954642b3852177793c0c17963303484051', + 'reference' => '15488d3405cfe28d08ca9662456181d48d550fec', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), From 8b7ccb0fd4165f14ce7eab19c9213fb5c3ea7b80 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 22 Dec 2024 12:14:25 +0100 Subject: [PATCH 023/501] PHP 8.4 is no longer a development release --- .github/workflows/tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d668d74e..93f66501 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,12 @@ jobs: continue-on-error: "${{ matrix.experimental }}" strategy: matrix: - php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] experimental: [false] - include: - - php-versions: '8.4' # development release, things can break - experimental: true +# uncomment this to start testing on development release +# include: +# - php-versions: '8.5' # development release, things can break +# experimental: true env: extensions: gd, sqlite3 extensions-cache-key-name: phpextensions From 99e0b7efacb1e7d11fa67a5a38e7fdad3387191e Mon Sep 17 00:00:00 2001 From: El RIDO Date: Wed, 25 Dec 2024 07:27:58 +0100 Subject: [PATCH 024/501] fix brackets, kudos @kanna5 --- js/privatebin.js | 4 ++-- lib/Configuration.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index d11b2355..e34979ec 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2309,10 +2309,10 @@ jQuery.PrivateBin = (function($, RawDeflate) { // show new bootstrap method (if available) if ($passwordModal.length !== 0) { if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($passwordModal[0]), { + (new bootstrap.Modal($passwordModal[0], { backdrop: 'static', keyboard: false - }).show(); + })).show(); } else { $passwordModal.modal({ backdrop: 'static', diff --git a/lib/Configuration.php b/lib/Configuration.php index 010d7aa1..a1afdda7 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-rbfSVRLvLB7zcmnDGOopePCL0BUEDH10Yd1sZig/l44MaxQGcMaAG/T5Zeln3it/0LxMOIujZV/By+0ShhwysQ==', + 'js/privatebin.js' => 'sha512-5JuYesxfZ0hS5Auqm5QkDsUy7ZzVabjcfS3zbVLfwkhJVt8ekzU5tYLbhaDTM+wmq3xwV+8N8krpp9fuF5kS3A==', '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==', From 333f0568b64c10ebe511237bd55d9313f5a440a1 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Fri, 27 Dec 2024 09:17:35 +0100 Subject: [PATCH 025/501] fix bootstrap 5 modal usage kudos @kanna5 --- js/privatebin.js | 88 +++++++++++++++++++++---------------------- lib/Configuration.php | 2 +- tpl/bootstrap5.php | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index e34979ec..f88753b5 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2237,8 +2237,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { const me = {}; let $passwordDecrypt, - $passwordForm, $passwordModal, + bootstrap5PasswordModal = null, password = ''; /** @@ -2257,8 +2257,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { password = $passwordDecrypt.val(); // hide modal - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($passwordModal[0])).hide(); + if (bootstrap5PasswordModal) { + bootstrap5PasswordModal.hide(); } else { $passwordModal.modal('hide'); } @@ -2308,24 +2308,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { { // show new bootstrap method (if available) if ($passwordModal.length !== 0) { - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($passwordModal[0], { - backdrop: 'static', - keyboard: false - })).show(); + if (bootstrap5PasswordModal) { + bootstrap5PasswordModal.show(); } else { - $passwordModal.modal({ - backdrop: 'static', - keyboard: false - }); $passwordModal.modal('show'); } - // focus password input - $passwordDecrypt.focus(); - // then re-focus it, when modal causes it to loose focus again - setTimeout(function () { - $passwordDecrypt.focus(); - }, 500); return; } @@ -2369,7 +2356,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // and also reset UI $passwordDecrypt.val(''); - } + }; /** * init status manager @@ -2382,11 +2369,26 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.init = function() { $passwordDecrypt = $('#passworddecrypt'); - $passwordForm = $('#passwordform'); $passwordModal = $('#passwordmodal'); // bind events - handle Model password submission - $passwordForm.submit(submitPasswordModal); + if ($passwordModal.length !== 0) { + $('#passwordform').submit(submitPasswordModal); + + const disableClosingConfig = { + backdrop: 'static', + keyboard: false, + show: false + }; + if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { + bootstrap5PasswordModal = new bootstrap.Modal($passwordModal[0], disableClosingConfig); + } else { + $passwordModal.modal(disableClosingConfig); + } + $passwordModal.on('shown.bs.modal', () => { + $passwordDecrypt.focus(); + }); + } }; return me; @@ -3985,10 +3987,6 @@ jQuery.PrivateBin = (function($, RawDeflate) { text: window.location.href }); $('#qrcode-display').html(qrCanvas); - // only necessary for bootstrap 5, other templates won't have this - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal('#qrcodemodal')).show(); - } } /** @@ -4077,32 +4075,34 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (expirationDate !== null) { const $emailconfirmTimezoneCurrent = $emailconfirmmodal.find('#emailconfirm-timezone-current'); const $emailconfirmTimezoneUtc = $emailconfirmmodal.find('#emailconfirm-timezone-utc'); - $emailconfirmTimezoneCurrent.off('click.sendEmailCurrentTimezone'); - $emailconfirmTimezoneCurrent.on('click.sendEmailCurrentTimezone', () => { - const emailBody = templateEmailBody(expirationDateRoundedToSecond.toLocaleString(), isBurnafterreading); - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($emailconfirmmodal[0])).hide(); + let localeConfiguration = { dateStyle: 'long', timeStyle: 'long' }; + const bootstrap5EmailConfirmModal = typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION ? + new bootstrap.Modal($emailconfirmmodal[0]) : null; + + function sendEmailAndHideModal() { + const emailBody = templateEmailBody( + // we don't use Date.prototype.toUTCString() because we would like to avoid GMT + expirationDateRoundedToSecond.toLocaleString( + [], localeConfiguration + ), isBurnafterreading + ); + if (bootstrap5EmailConfirmModal) { + bootstrap5EmailConfirmModal.hide(); } else { $emailconfirmmodal.modal('hide'); } triggerEmailSend(emailBody); - }); + }; + + $emailconfirmTimezoneCurrent.off('click.sendEmailCurrentTimezone'); + $emailconfirmTimezoneCurrent.on('click.sendEmailCurrentTimezone', sendEmailAndHideModal); $emailconfirmTimezoneUtc.off('click.sendEmailUtcTimezone'); $emailconfirmTimezoneUtc.on('click.sendEmailUtcTimezone', () => { - const emailBody = templateEmailBody(expirationDateRoundedToSecond.toLocaleString( - undefined, - // we don't use Date.prototype.toUTCString() because we would like to avoid GMT - { timeZone: 'UTC', dateStyle: 'long', timeStyle: 'long' } - ), isBurnafterreading); - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($emailconfirmmodal[0])).hide(); - } else { - $emailconfirmmodal.modal('hide'); - } - triggerEmailSend(emailBody); + localeConfiguration.timeZone = 'UTC'; + sendEmailAndHideModal(); }); - if (typeof bootstrap !== 'undefined' && bootstrap.Tooltip.VERSION) { - (new bootstrap.Modal($emailconfirmmodal[0])).show(); + if (bootstrap5EmailConfirmModal) { + bootstrap5EmailConfirmModal.show(); } else { $emailconfirmmodal.modal('show'); } diff --git a/lib/Configuration.php b/lib/Configuration.php index dc1fcb94..6bc95238 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-5JuYesxfZ0hS5Auqm5QkDsUy7ZzVabjcfS3zbVLfwkhJVt8ekzU5tYLbhaDTM+wmq3xwV+8N8krpp9fuF5kS3A==', + 'js/privatebin.js' => 'sha512-1RKY0XUEbDtZ6M4/YUwmLsav/qSzteqc/93jvEaH5mFLhCl8f+dItPy6Q8hUcydz10oyCYrB4DFSAtYfcaKZMg==', '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/bootstrap5.php b/tpl/bootstrap5.php index 4db055ca..d96aafb6 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -193,7 +193,7 @@ if ($EMAIL) : endif; if ($QRCODE) : ?> - Date: Fri, 27 Dec 2024 09:45:22 +0100 Subject: [PATCH 026/501] avoid unnecessary indentation --- lib/I18n.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/I18n.php b/lib/I18n.php index 3737bc46..89693083 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -134,10 +134,8 @@ class I18n if (strpos($args[0], '') !== false) { continue; } - } else { - if (is_int($args[$i])) { - continue; - } + } elseif (is_int($args[$i])) { + continue; } $args[$i] = self::encode($args[$i]); } From 6c39a1441c72bd8ef4c45544d7903a093d4bef28 Mon Sep 17 00:00:00 2001 From: ribas160 Date: Sat, 28 Dec 2024 18:42:46 +0200 Subject: [PATCH 027/501] 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 028/501] - 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 029/501] 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; ?>