Ello @madonchik123, hope you’re doing well! Roblox’s introduction of the new system for private server links means the old deeplink method is now obsolete.
Fortunately, there’s a new way to handle this! All you’ll need is your access code, which you can slot into the updated format to join your private server.
roblox://navigation/share_links?code={AccessCode}&type=Server
As for the part of your post that mentions JavaScript - I’m not entirely sure of your usecase or how you plan to use JavaScript as a part of this, however, if you’re making some sort of system where an end-user goes to a domain with a path, you can simply just make it redirect to an encoded link (in the format above) which will automatically open the players game (after they acknowledge permissions for your site to open Roblox)!