-var win = window.dialogArguments || opener || parent || top;
-
-if ( win && win.tinymce && win.tinymce.isMac ) {
- document.body.className = document.body.className.replace(/windows/, 'macos');
+if ( navigator.userAgent.indexOf( 'Mac OS' ) > -1 ) {
+ document.body.className = document.body.className.replace( /windows/, 'macos' );