cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhi...@apache.org
Subject cordova-plugin-device git commit: Readme: Add fenced code blocks with langauage hints
Date Wed, 18 May 2016 19:17:58 GMT
Repository: cordova-plugin-device
Updated Branches:
  refs/heads/master e077870a2 -> e87058377


Readme: Add fenced code blocks with langauage hints


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/e8705837
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/e8705837
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/e8705837

Branch: refs/heads/master
Commit: e87058377bc58958c1499d51590f4d306e27039b
Parents: e077870
Author: Nikhil Khandelwal <nikhilkh@microsoft.com>
Authored: Wed May 18 12:17:49 2016 -0700
Committer: Nikhil Khandelwal <nikhilkh@microsoft.com>
Committed: Wed May 18 12:17:49 2016 -0700

----------------------------------------------------------------------
 README.md | 141 ++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 80 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/e8705837/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a0e38f5..ad0834d 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,12 @@ description: Get device information.
 This plugin defines a global `device` object, which describes the device's hardware and software.
 Although the object is in the global scope, it is not available until after the `deviceready`
event.
 
-    document.addEventListener("deviceready", onDeviceReady, false);
-    function onDeviceReady() {
-        console.log(device.cordova);
-    }
+```js
+document.addEventListener("deviceready", onDeviceReady, false);
+function onDeviceReady() {
+    console.log(device.cordova);
+}
+```
 
 Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Device%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
 
@@ -87,15 +89,17 @@ different across versions of the same product.
 
 ### Quick Example
 
-    // Android:    Nexus One       returns "Passion" (Nexus One code name)
-    //             Motorola Droid  returns "voles"
-    // BlackBerry: Torch 9800      returns "9800"
-    // Browser:    Google Chrome   returns "Chrome"
-    //             Safari          returns "Safari"
-    // iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
-    // OSX:                        returns "x86_64"
-    // 
-    var model = device.model;
+```js
+// Android:    Nexus One       returns "Passion" (Nexus One code name)
+//             Motorola Droid  returns "voles"
+// BlackBerry: Torch 9800      returns "9800"
+// Browser:    Google Chrome   returns "Chrome"
+//             Safari          returns "Safari"
+// iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+// OSX:                        returns "x86_64"
+// 
+var model = device.model;
+```
 
 ### Android Quirks
 
@@ -113,8 +117,9 @@ different across versions of the same product.
 
 Get the device's operating system name.
 
-    var string = device.platform;
-
+```js
+var string = device.platform;
+```
 ### Supported Platforms
 
 - Android
@@ -129,15 +134,17 @@ Get the device's operating system name.
 
 ### Quick Example
 
-    // Depending on the device, a few examples are:
-    //   - "Android"
-    //   - "BlackBerry 10"
-    //   - "browser"
-    //   - "iOS"
-    //   - "WinCE"
-    //   - "Tizen"
-    //   - "Mac OS X"
-    var devicePlatform = device.platform;
+```js
+// Depending on the device, a few examples are:
+//   - "Android"
+//   - "BlackBerry 10"
+//   - "browser"
+//   - "iOS"
+//   - "WinCE"
+//   - "Tizen"
+//   - "Mac OS X"
+var devicePlatform = device.platform;
+```
 
 ### Windows Phone 7 Quirks
 
@@ -151,7 +158,9 @@ Windows Phone 8 devices report the platform as `Win32NT`.
 
 Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
 
-    var string = device.uuid;
+```js
+var string = device.uuid;
+```
 
 ### Description
 
@@ -169,19 +178,21 @@ The details of how a UUID is generated are determined by the device
manufacturer
 
 ### Quick Example
 
-    // Android: Returns a random 64-bit integer (as a string, again!)
-    //          The integer is generated on the device's first boot
-    //
-    // BlackBerry: Returns the PIN number of the device
-    //             This is a nine-digit unique integer (as a string, though!)
-    //
-    // iPhone: (Paraphrased from the UIDevice Class documentation)
-    //         Returns the [UIDevice identifierForVendor] UUID which is unique and the same
for all apps installed by the same vendor. However the UUID can be different if the user deletes
all apps from the vendor and then reinstalls it.
-    // Windows Phone 7 : Returns a hash of device+current user,
-    // if the user is not defined, a guid is generated and will persist until the app is
uninstalled
-    // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is
a number
-    // unique to every GSM and UMTS mobile phone.
-    var deviceID = device.uuid;
+```js
+// Android: Returns a random 64-bit integer (as a string, again!)
+//          The integer is generated on the device's first boot
+//
+// BlackBerry: Returns the PIN number of the device
+//             This is a nine-digit unique integer (as a string, though!)
+//
+// iPhone: (Paraphrased from the UIDevice Class documentation)
+//         Returns the [UIDevice identifierForVendor] UUID which is unique and the same for
all apps installed by the same vendor. However the UUID can be different if the user deletes
all apps from the vendor and then reinstalls it.
+// Windows Phone 7 : Returns a hash of device+current user,
+// if the user is not defined, a guid is generated and will persist until the app is uninstalled
+// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
+// unique to every GSM and UMTS mobile phone.
+var deviceID = device.uuid;
+```
 
 ### iOS Quirk
 
@@ -220,22 +231,24 @@ Get the operating system version.
 
 ### Quick Example
 
-    // Android:    Froyo OS would return "2.2"
-    //             Eclair OS would return "2.1", "2.0.1", or "2.0"
-    //             Version can also return update level "2.1-update1"
-    //
-    // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
-    //
-    // Browser:    Returns version number for the browser
-    //
-    // iPhone:     iOS 3.2 returns "3.2"
-    //
-    // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
-    // Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384
-    // Tizen: returns "TIZEN_20120425_2"
-    // OSX:        El Capitan would return "10.11.2"
-    //
-    var deviceVersion = device.version;
+```js
+// Android:    Froyo OS would return "2.2"
+//             Eclair OS would return "2.1", "2.0.1", or "2.0"
+//             Version can also return update level "2.1-update1"
+//
+// BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+//
+// Browser:    Returns version number for the browser
+//
+// iPhone:     iOS 3.2 returns "3.2"
+//
+// Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+// Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384
+// Tizen: returns "TIZEN_20120425_2"
+// OSX:        El Capitan would return "10.11.2"
+//
+var deviceVersion = device.version;
+```
 
 ## device.manufacturer
 
@@ -253,17 +266,21 @@ Get the device's manufacturer.
 
 ### Quick Example
 
-    // Android:    Motorola XT1032 would return "motorola"
-    // BlackBerry: returns "BlackBerry"
-    // iPhone:     returns "Apple"
-    //
-    var deviceManufacturer = device.manufacturer;
+```js
+// Android:    Motorola XT1032 would return "motorola"
+// BlackBerry: returns "BlackBerry"
+// iPhone:     returns "Apple"
+//
+var deviceManufacturer = device.manufacturer;
+```
 
 ## device.isVirtual
 
 whether the device is running on a simulator.
 
-    var isSim = device.isVirtual;
+```js
+var isSim = device.isVirtual;
+```
 
 ### Supported Platforms
 
@@ -281,7 +298,9 @@ The `isVirtual` property on OS X always returns false.
 
 Get the device hardware serial number ([SERIAL](http://developer.android.com/reference/android/os/Build.html#SERIAL)).
 
-    var string = device.serial;
+```js
+var string = device.serial;
+```
 
 ### Supported Platforms
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message