I was looking for a way for my Raspberry PI to automatically log into my Ubiquiti NVR and having found a few resources online all dealing with VB script launchers figured there has to be an easier way. I was wrong. But here is what I came up with.
Search for the /uv3/views/LoginView controller and edit the data to change the lines from:
username: this.$username.val(), password: this.$password.val()
username: "(your username)", password: "(your password)"
This will automatically provide a username/password to the controller on form submission. Now to get the controller to automatically log you in, look for the function nearby called didInsertElement and edit it from:
this.$().find("input") && this.$().find("input").focus()
this.$().find("input") && this.$().find("input").focus();this.doLogin();
Now when you browse to the login screen it will automatically log you in without the need for a VB script.
Naturally, it will always login with the given username/password so before any admin functions you need to perform you will need to swap out the changes and any patching will undo all of these changes.
Round three of my edit will include the ability to provide a different username/password based on the calling IP address so from my administrator machine or VPN tunnel I can access the admin features while reception will automatically login with a standard user account.
PS. The logout button now will also not do anything unless you redirect it elsewhere.