Info

We provide helpful information via the window.todesktop object. Here is an overview of what's available:

if (window.todesktop) {
/*
The current version of ToDesktop: e.g. '1.0'
*/
console.log(window.todesktop.os.platform);
/*
The current version of Electron: e.g. '5.0.2'
*/
console.log(window.todesktop.os.platform);
/*
Same as os.platform() in node: e.g. 'darwin'
*/
console.log(window.todesktop.os.platform);
/*
Same as os.release() in node: e.g. '18.6.0'
*/
console.log(window.todesktop.os.release);
/*
Same as os.type() in node: e.g. 'Darwin'
*/
console.log(window.todesktop.os.type);
/*
Same as os.arch() in node: e.g. 'x64'
*/
console.log(window.todesktop.os.arch);
}

Always make sure window.todesktop is present before trying to access its properties or use its methods.