• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details
Home / Archives for User Details

User Details

Detect the preferred language of the current user

Detect the preferred language of the current user

Use Navigator.language or the first value of Navigator.languages if available, otherwise return defaultLang.

User Details

Detect whether the page is being viewed on a mobile device or a desktop

Detect whether the page is being viewed on a mobile device or a desktop

Use a regular expression to test the navigator.userAgent property to figure out if the device is a mobile device or a desktop.

User Details

Detect the dark mode

Detect the dark mode

Modern operating systems allow users to choose the appearance they would like to see in all applications. The option can be detected by looking at the prefers-color-scheme media query.

User Details

Screen Size

Use this script to show visitors an interesting detail about their screen – the size of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site.

User Details

IP Grabber – get a users IP address with JavaScript

IP Grabber

Whether it’s ethical or not, getting information on your site’s visitors is just plain neat. As one of the most requested scripts, this little gem will allow you to get the user’s IP address! Neat!

Featured, User Details

Primary Sidebar

FREE UPDATES!

Get the latest updates in your inbox for FREE!

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2023 JavaScriptSource.com

  • About
  • Privacy Policy
  • Submit
  • FAQ
  • Jobs For Developers
  • Contact Us