diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-02-08 22:28:00 +0100 |
---|---|---|
committer | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-02-08 22:28:00 +0100 |
commit | ea11b982ce6d73485a912a50814bbd523396e539 (patch) | |
tree | 70ed64e97307d3b15f1e5b6d3dcbf6144cac1351 /js | |
parent | added support for contact me links (diff) | |
download | beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar.gz beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar.bz2 beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar.lz beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar.xz beziapp-ea11b982ce6d73485a912a50814bbd523396e539.tar.zst beziapp-ea11b982ce6d73485a912a50814bbd523396e539.zip |
Diffstat (limited to 'js')
-rw-r--r-- | js/messaging.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/messaging.js b/js/messaging.js index 9ae0b99..f275829 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -12,10 +12,6 @@ const API_ENDPOINT = "https://gimb.tk/test.php"; // const API_ENDPOINT = "http://localhost:5000/test.php"; var receivedmessages = null; -if(window.location.search.substring(1)) { - document.getElementById("full_name").value = window.location.search.substring(1); - validateName(); -} loadMessages(true, 0); localforage.setItem('directory', { @@ -289,7 +285,11 @@ function validateName() { M.toast({ html: "Unable to read directory of people. Unable to autocomplete the name of the person."}); console.log(err); }); - + if(window.location.search.substring(1)) { + document.getElementById("full_name").value = decodeURIComponent(window.location.search.substring(1)); + M.updateTextFields(); + validateName(); + } document.getElementById("full_name").addEventListener("blur", validateName); document.getElementById("msg_send").addEventListener("click", function() { localforage.getItem('directory').then(function(value) { |