Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:01:24+00:00 2026-05-28T02:01:24+00:00

I have been writing a userscript for the past few months, for my company,

  • 0

I have been writing a userscript for the past few months, for my company, and have just designed the main site for it with installation instructions (our employees are based all around the world and very few have heard of userscripts, let alone used them, so this frontend is meant to cut down the time I spend supporting the script).

What I would like to do is, on the installation page, detect which browser and OS / OS version they’re using so that I can highlight the most relevant instructions slightly darker than the rest, or simply not display irrelevant sections.

For example for IE6 you must use Trixie (I believe) to install userscripts, and this is supported on Win XP only. IE7 is supported on Win XP, IE8 is supported on Win XP & Win 7 and IE9 is supported on Win 7 only. For IE7, 8 & 9 I am advising to use IEPro. The difference between Trixie & IEPro is that Trixie requires a file extension of .user.js which must be saved in C:/Program Files/bhelpuri. IEPro, on the other hand, requires the extension to be .ieuser and saves to a different location. For IE specifically, I would like to detect the version and display only the correct link (either .user.js or .ieuser, depending on what plugin they should be using for their current browser) so that they’re taken to the correct version of the file for that browser with the correct save path for that OS / OS version. Is this making any sense so far?

Basically my question is, does anyone know of a way to detect the operating system version? I am currently using http://www.stoimen.com/blog/2009/07/04/jquery-os-detection/ but that doesn’t give the OS version, only the OS. I have tried looping through all of the variables stored in the navigator object with no success. Any help would be greatly appreciated.

Edit: Thanks to Nates answer, I have put the exact code at http://jsfiddle.net/Mu8r5/1/. I hope this helps someone in the future.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:01:25+00:00Added an answer on May 28, 2026 at 2:01 am

    Your best bet is to use the navigator.userAgent property. It will give the windows version number. You can see a table of how the Windows version number map to the OS here:

    OSVERSIONINFO

    Here is some example detection code:

    var os = (function() {
        var ua = navigator.userAgent.toLowerCase();
        return {
            isWin2K: /windows nt 5.0/.test(ua),
            isXP: /windows nt 5.1/.test(ua),
            isVista: /windows nt 6.0/.test(ua),
            isWin7: /windows nt 6.1/.test(ua),
            isWin8: /windows nt 6.2/.test(ua),
            isWin81: /windows nt 6.3/.test(ua)
        };
    }());
    
    if(os.isWin7) {
        ...
    }
    

    http://jsfiddle.net/45jEc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been writing this Android application for the past few days and everything
For the last couple of months I have been writing an intranet site for
I have been writing in PHP for just over half a year now, and
I have been writing my first few Django models and wanted to take a
I have been writing this encryption algorithm in my free time for a few
I have been writing a cms with MVC being used as the main engine
I have been writing C for only a scant few weeks and have not
I have been writing some Web services to be used by a few different
I have been writing javascript for one or two months , I never used
I have been writing a JavaScript library for a few weeks now and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.