diff options
| author | Melonai <einebeere@gmail.com> | 2020-05-07 00:53:08 +0200 |
|---|---|---|
| committer | Melonai <einebeere@gmail.com> | 2020-05-07 00:53:08 +0200 |
| commit | bc42d900d956f11307d14136f8e24d7cd793b012 (patch) | |
| tree | b7e1e29f2972f26a5a5397083541312ca98a6c1f /client/main.js | |
| download | shorest-bc42d900d956f11307d14136f8e24d7cd793b012.tar.zst shorest-bc42d900d956f11307d14136f8e24d7cd793b012.zip | |
initial structure
Diffstat (limited to 'client/main.js')
| -rw-r--r-- | client/main.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/main.js b/client/main.js new file mode 100644 index 0000000..652776a --- /dev/null +++ b/client/main.js @@ -0,0 +1,13 @@ +function onFormSubmit() { + return false; +} + +function inputUpdate() { + const pattern = /^(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?&/; + const userInput = document.getElementById('url').value; + if (pattern.test(userInput)) { + document.getElementById('form-group').style.borderColor = '#E0E0E0'; + } else { + document.getElementById('form-group').style.borderColor = '#FFBCBC'; + } +} \ No newline at end of file |
