diff --git a/creator/index.html b/creator/index.html index e4c4023..3459515 100644 --- a/creator/index.html +++ b/creator/index.html @@ -13,6 +13,12 @@ margin: 5px; } + .danger { + background-color: lightcoral; + border: 2px dotted red; + padding: 12px 20px; + } + button { font-size: large; padding: 12px 20px; @@ -38,6 +44,13 @@ const iterations = 1000000 // key derivation (with PBKDF2) const keySize = 32 // bytes (derived with PBKDF2, used by AES) + // Display a warning if the current URL protocol is not HTTPS + async function checkURLProtocol() { + if (window.location.protocol !== 'https:') { + document.getElementById("danger_text").hidden = false + } + } + const inputElementIds = { "message": "text_input_div", "image": "image_input_div", @@ -47,6 +60,7 @@ let selectedInputType = "" async function init() { + await checkURLProtocol() await refreshSalt() await refreshIV() setMessage("Select secret type: message, image, or file") @@ -303,6 +317,10 @@