cs01 / termpair

View and control terminals from your browser with end-to-end encryption 🔒
MIT License
1.61k stars 72 forks source link

Ensure error message is printed to browser's terminal if site is not served in a secure context #40

Closed cs01 closed 3 years ago

cs01 commented 3 years ago

The logic to display the error message had a bug. This PR fixes the bug and prints a red message in the terminal if the browser is not running in a secure context where window.crypto is unavailable.See https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto.

fixes #39