Document copy code button requiring secure context (#1225)

Fixes part (1) of https://github.com/just-the-docs/just-the-docs/issues/1202
This commit is contained in:
Robin Moffatt 2023-04-20 06:48:34 +01:00 committed by GitHub
parent d2e34cb54d
commit a1ca235757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,4 +202,4 @@ The copy button for code blocks can be enabled or disabled via the `enable_copy_
enable_copy_code_button: true
```
Note that this feature requires JavaScript; if JavaScript is disabled in the browser, this feature will not work.
Note that this feature requires JavaScript; if JavaScript is disabled in the browser, this feature will not work. In addition, this feature uses `navigator.clipboard`, which is only available in [secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (such as over HTTPS). If the site is viewed in an insecure context, the copy button will not work ([relevant issue: #1202](https://github.com/just-the-docs/just-the-docs/issues/1202)).