When I connect my phone to the computer and visit Google play store in google chrome, it seams like the page knows that the device is connected, like this picture:

How can I do it using JavaScript?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From what I can tell, once you link your phone to your Google account, Google attaches your phone’s to your Google Play account and then displays it to you when you’re looking at apps using your computer’s web browser. Don’t think there’s any Javascript at play here.