From ab0c9f3e85e8f5d80835642b567679a18222b02d Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 24 Feb 2023 20:45:43 -0800 Subject: [PATCH] Add helpers for direct calling in DevTools --- index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(); -- 2.47.3