From: Ardis Lu Date: Sat, 25 Feb 2023 04:45:43 +0000 (-0800) Subject: Add helpers for direct calling in DevTools X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=ab0c9f3e85e8f5d80835642b567679a18222b02d;p=static-encrypt Add helpers for direct calling in DevTools --- diff --git a/index.html b/index.html index 0c5b685..8a21f88 100644 --- a/index.html +++ b/index.html @@ -206,6 +206,19 @@ }) const template = await fetch('/template.html').then(r => r.text()); + + // For debugging and bulk usage in the DevTools console + function help() { + console.table({ + 'help(): void': 'Print this message.', + 'encrypt(plaintext: string, password: string): Promise': 'Encrypt a string.', + 'decrypt(content: string, password: string): Promise': 'Decrypt an encrypted string.' + }); + } + globalThis.help = help; + globalThis.encrypt = encrypt; + globalThis.decrypt = decrypt; + help();