Skip to content

Instantly share code, notes, and snippets.

@alexgibson
Last active November 21, 2019 14:51
Show Gist options
  • Save alexgibson/7826f2b4b2e24ab1c21878bff87addff to your computer and use it in GitHub Desktop.
Save alexgibson/7826f2b4b2e24ab1c21878bff87addff to your computer and use it in GitHub Desktop.
function isWin10S() {
try {
var mode = JSON.parse(window.external.getHostEnvironmentValue('os-mode'));
if (mode && mode['os-mode'] === '2') {
return true;
}
return false;
} catch(e) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment