Why? If you are thinking "let the user decide when to use an user-agent and not set a default", then no, using an user-agent by default is in order to make debugging issues easier to MEGA admins since, unless the client defines one, issues cannot be traced to a client. MEGA even says in their documentation to not use clients that don't use their own code because they might have issues and they even cite an issue I reported to them of a third party client that used all zero encryption keys. How did they know what client had the bug? By the user-agent. That's why version 1 of MEGAJS uses a user-agent by default. If you got issues with that (like in Firefox) just set it to null.
Edit: I misread the code diff, you removed the entire user-agent code, not just the default user-agent selection code. No way, I will close this.
Why? If you are thinking "let the user decide when to use an user-agent and not set a default", then no, using an user-agent by default is in order to make debugging issues easier to MEGA admins since, unless the client defines one, issues cannot be traced to a client. MEGA even says in their documentation to not use clients that don't use their own code because they might have issues and they even cite an issue I reported to them of a third party client that used all zero encryption keys. How did they know what client had the bug? By the user-agent. That's why version 1 of MEGAJS uses a user-agent by default. If you got issues with that (like in Firefox) just set it to
null
.Edit: I misread the code diff, you removed the entire user-agent code, not just the default user-agent selection code. No way, I will close this.