From 3ab188539c8529d4fa79497abb84f509d1411318 Mon Sep 17 00:00:00 2001 From: Ryan Willoughby Date: Wed, 5 Jun 2013 12:37:10 -0700 Subject: [PATCH] [js] cordova.require instead of PhoneGap.require --- README.md | 4 ++-- plugin.xml | 2 +- www/barcodescanner.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a04d20..2008db7 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ The following barcode types are currently supported: A full example could be: ``` - var scanner = window.PhoneGap.require("cordova/plugin/BarcodeScanner"); + var scanner = cordova.require("cordova/plugin/BarcodeScanner"); scanner.scan( function (result) { @@ -75,7 +75,7 @@ Supported encoding types: ``` A full example could be: - var scanner = window.PhoneGap.require("cordova/plugin/BarcodeScanner"); + var scanner = cordova.require("cordova/plugin/BarcodeScanner"); scanner.encode(BarcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) { alert("encode success: " + success); diff --git a/plugin.xml b/plugin.xml index 0f4bff8..d54189c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="0.5.1"> BarcodeScanner diff --git a/www/barcodescanner.js b/www/barcodescanner.js index 4cc56a4..cfc11ee 100644 --- a/www/barcodescanner.js +++ b/www/barcodescanner.js @@ -7,7 +7,7 @@ */ -PhoneGap.define("cordova/plugin/BarcodeScanner", +cordova.define("cordova/plugin/BarcodeScanner", function (require, exports, module) {