You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2012/05/19 02:40:44 UTC

svn commit: r1340322 - in /incubator/ooo/ooo-site/trunk/content/download: download_new_dl_aoo.js download_new_mirrorbrain_aoo.js

Author: marcus
Date: Sat May 19 00:40:44 2012
New Revision: 1340322

URL: http://svn.apache.org/viewvc?rev=1340322&view=rev
Log:
Added more information to the platform recognition

Modified:
    incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js
    incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js

Modified: incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js?rev=1340322&r1=1340321&r2=1340322&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js (original)
+++ incubator/ooo/ooo-site/trunk/content/download/download_new_dl_aoo.js Sat May 19 00:40:44 2012
@@ -480,11 +480,11 @@ function getPlatform( schema ) {
 	if ( schema == "aoo" ) {
 		if ( navigator.platform != null &&  String( navigator.platform ) != "" ) {
 			if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
-				return "Windows";
+				return "Windows (MSI)";
 			} else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
-				return "Windows";
+				return "Windows (MSI)";
 			} else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
-				return "Windows";
+				return "Windows (MSI)";
 			} else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
 				if ( navigator.platform.indexOf( "64" ) != -1 ) {
 					if ( navigator.userAgent != null ) {
@@ -512,38 +512,42 @@ function getPlatform( schema ) {
 					}
 				}
 			} else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+				// return "Solaris x86 (PKG)";
 				return "none";
 			} else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+				// return "Solaris SPARC (PKG)";
 				return "none";
 			} else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+				// return "Solaris SPARC (PKG)";
 				return "none";
 			} else if ( navigator.platform.indexOf( "Mac" ) != -1 &&
 				    navigator.platform.indexOf( "Intel" ) != -1 ) {
-				return "Mac OS Intel";
+				return "Mac OS Intel (DMG)";
 			} else if ( navigator.platform.indexOf( "Mac" ) != -1 &&
 				    navigator.platform.indexOf( "PPC" ) != -1 ) {
+				// return "Mac OS PPC (DMG)";
 				return "none";
 			} else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
-				return "Mac OS Intel" ;
+				return "Mac OS Intel (DMG)";
+
+			// this code will redirect the iPad, iPhone and iPod entries
 			} else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
 				    navigator.platform.indexOf( "iPhone" ) != -1 ||
 				    navigator.platform.indexOf( "iPod" ) != -1 ) {
-				// this code will redirect the iPad, iPhone and iPod entries
-				return "Mac OS Intel" ;
+				return "none";
 			} else if ( navigator.platform.indexOf( "Series60" ) != -1 ) {
-				// this code will redirect the Series60 entries
-				return "Windows" ;
+				return "none";
 			} else if ( navigator.platform.indexOf( "null" ) != -1 ) {
-				return "Windows" ;
+				return "none";
 			} else {
-				// return platform name
-				return "no_platform";
+				// no platform was recognized
+				return "none";
 			}
 		}
 	}
 	// if navigator.platform is null or empty
 	// and if no schema is set, fall through if nothing else works
-	return "no_platform";
+	return "none";
 }
 
 function continueToDownload( uri ) {

Modified: incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js?rev=1340322&r1=1340321&r2=1340322&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js (original)
+++ incubator/ooo/ooo-site/trunk/content/download/download_new_mirrorbrain_aoo.js Sat May 19 00:40:44 2012
@@ -219,7 +219,7 @@ function mirrorbrain_getPlatformForMirro
 			} else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
 				    navigator.platform.indexOf( "iPhone" ) != -1 ||
 				    navigator.platform.indexOf( "iPod" ) != -1 ) {
-				return "MacOS_x86_install" ;
+				return "MacOS_x86_install";
 			} else {
 				return "no_ooo_platform";
 			}
@@ -286,7 +286,7 @@ function mirrorbrain_getPlatformForMirro
 			} else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
 				    navigator.platform.indexOf( "iPhone" ) != -1 ||
 				    navigator.platform.indexOf( "iPod" ) != -1 ) {
-				return "MacOS_x86_install" ;
+				return "MacOS_x86_install";
 			} else {
 				return "no_aoo_platform";
 			}
@@ -329,7 +329,7 @@ function mirrorbrain_getExtension( nl_la
 		} else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
 			    navigator.platform.indexOf( "iPhone" ) != -1 ||
 			    navigator.platform.indexOf( "iPod" ) != -1 ) {
-			return ".dmg" ;
+			return ".dmg";
 		} else {
 			return "no_extension";
 		}