]> source.dussan.org Git - nextcloud-server.git/commitdiff
No more jQuery 18897/head
authorJoas Schilling <coding@schilljs.com>
Tue, 14 Jan 2020 17:59:18 +0000 (18:59 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 6 Feb 2020 19:41:42 +0000 (20:41 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/js/publicshareauth.js

index 7f3f0d0a7d49b078e2b20645cd22b6c5a68a5571..af0619545064de8d7749bdb748785167bd3f6901 100644 (file)
@@ -1,9 +1,11 @@
-$(document).ready(function(){
-       $('#password').on('keyup input change', function() {
-               if ($('#password').val().length > 0) {
-                       $('#password-submit').prop('disabled', false);
-               } else {
-                       $('#password-submit').prop('disabled', true);
-               }
-       });
+document.addEventListener('DOMContentLoaded', function() {
+       var passwordInput = document.getElementById('password');
+       var passwordButton = document.getElementById('password-submit');
+       var eventListener = function() {
+               passwordButton.disabled = passwordInput.value.length === 0;
+       };
+
+       passwordInput.addEventListener('click', eventListener);
+       passwordInput.addEventListener('keyup', eventListener);
+       passwordInput.addEventListener('change', eventListener);
 });