Skip to content

Commit

Permalink
added docs copy feature
Browse files Browse the repository at this point in the history
  • Loading branch information
novcmbro committed Jun 16, 2024
1 parent 44d373e commit b6a96a6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 2 deletions.
13 changes: 13 additions & 0 deletions docs/en/feature-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Decoder - 2. Features
## 2.4. Copy
### copy.js
Copies the encrypted or decrypted output text to clipboard and alerts if copy was successful or failed.

### Method `copy`
- `copy.handle`: Copies the output text to clipboard using `navigator.clipboard.writeText` or `execCommand("copy")` method. Fails as unsupported feature if neither methods are available in browser. Opens a popup alert with success, error or unsupported message.
- `message`: Variable that contains messages for each result case.
- `copy.init`: Attaches `copy.handle` to copy button on click event.

<br>

### [🡨 previous](/docs/en/feature-cryptography.md)
2 changes: 1 addition & 1 deletion docs/en/feature-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Encryption replaces each letter by its corresponding term and decryption replace

<br>

### [🡨 previous](/docs/en/feature-translation.md)
### [🡨 previous](/docs/en/feature-translation.md)[next 🡪](/docs/en/feature-copy.md)
1 change: 1 addition & 0 deletions docs/en/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Index | Title
1 | [Theme](/docs/en/feature-theme.md)
2 | [Translation](/docs/en/feature-translation.md)
3 | [Cryptography](/docs/en/feature-cryptography.md)
4 | [Copy](/docs/en/feature-copy.md)

<br>

Expand Down
1 change: 1 addition & 0 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Index | Title
2.1 | [Features - Theme](/docs/en/feature-theme.md)
2.2 | [Features - Translation](/docs/en/feature-translation.md)
2.3 | [Features - Cryptography](/docs/en/feature-cryptography.md)
2.4 | [Features - Copy](/docs/en/feature-copy.md)

<br>

Expand Down
13 changes: 13 additions & 0 deletions docs/pt/feature-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Decoder - 2. Funcionalidades
## 2.4. Cópia
### copy.js
Copia o texto de saída criptografado ou descriptografado para a área de transferência e alerta se a cópia foi bem-sucedida ou falhou.

### Método `copy`
- `copy.handle`: Copia o texto de saída para a área de transferência usando o método `navigator.clipboard.writeText` ou `execCommand("copy")`. Falha como recurso não suportado se nenhum dos métodos estiverem disponíveis no navegador. Abre um alerta popup com mensagem de sucesso, erro ou não suportado.
- `message`: Variável que contém mensagens para cada caso de resultado.
- `copy.init`: Anexa `copy.handle` ao botão de cópia no evento de clique.

<br>

### [🡨 anterior](/docs/pt/feature-cryptography.md)
2 changes: 1 addition & 1 deletion docs/pt/feature-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Criptografia substitui cada letra por seu termo correspondente e descriptografia

<br>

### [🡨 anterior](/docs/pt/feature-translation.md)
### [🡨 anterior](/docs/pt/feature-translation.md)[próximo 🡪](/docs/pt/feature-copy.md)
1 change: 1 addition & 0 deletions docs/pt/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
1 | [Tema](/docs/pt/feature-theme.md)
2 | [Tradução](/docs/pt/feature-translation.md)
3 | [Criptografia](/docs/pt/feature-cryptography.md)
4 | [Cópia](/docs/pt/feature-copy.md)

<br>

Expand Down
1 change: 1 addition & 0 deletions docs/pt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
2.1 | [Funcionalidades - Tema](/docs/pt/feature-theme.md)
2.2 | [Funcionalidades - Tradução](/docs/pt/feature-translation.md)
2.3 | [Funcionalidades - Criptografia](/docs/pt/feature-cryptography.md)
2.4 | [Funcionalidades - Cópia](/docs/pt/feature-copy.md)

<br>

Expand Down

0 comments on commit b6a96a6

Please sign in to comment.