replaced the term "paste" with the more generic "document"

Some of the references to "paste" in code or comments got changed as well, but to clarify the intended usage of the terms:

- A PrivateBin document can consist of a paste text (key "paste" in the encrypted payload) and one or several attachments and discussion entries.
- Internally the root document is called a "Paste" and each discussion entry is called a "Discussion".
- When referring to a whole document with one paste and optional discussion(s), we call it just "document".
- When talking about a particular JSON payload type in the internal logic, i.e. during storage or transmission, we call them a paste or discussion to distinguish which type we refer to.

closes #397
This commit is contained in:
El RIDO 2025-07-24 10:46:31 +02:00
parent e2bf8ffb2d
commit ddd2d72064
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
62 changed files with 1141 additions and 1140 deletions

View file

@ -4,7 +4,7 @@ const common = require('../common');
describe('CopyToClipboard', function() {
this.timeout(30000);
describe ('Copy paste to clipboard', function () {
describe ('Copy document to clipboard', function () {
jsc.property('Copy with button click',
common.jscFormats(),
'nestring',
@ -13,7 +13,7 @@ describe('CopyToClipboard', function() {
common.enableClipboard();
$('body').html(
'<div id="placeholder" class="hidden">+++ no paste text ' +
'<div id="placeholder" class="hidden">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden">' +
'<button type="button" id="prettyMessageCopyBtn"><svg id="copyIcon"></svg>' +
'<svg id="copySuccessIcon"></svg></button><pre ' +
@ -40,7 +40,7 @@ describe('CopyToClipboard', function() {
/**
* Unfortunately in JSVerify impossible to check if copy with shortcut when user selected some text on the page
* (the copy paste to clipboard should not work in this case) due to lacking window.getSelection() in jsdom.
* (the copy document to clipboard should not work in this case) due to lacking window.getSelection() in jsdom.
*/
jsc.property('Copy with keyboard shortcut',
common.jscFormats(),
@ -50,7 +50,7 @@ describe('CopyToClipboard', function() {
common.enableClipboard();
$('body').html(
'<div id="placeholder">+++ no paste text ' +
'<div id="placeholder">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden">' +
'<button type="button" id="prettyMessageCopyBtn"><svg id="copyIcon"></svg>' +
'<svg id="copySuccessIcon"></svg></button><pre ' +