Permalink
Browse files

updated softkeyboard.js and return module

  • Loading branch information...
1 parent 4a7e787 commit ff940d3689cfbee314d58c2a4f61656466b2a359 Tobias Brunkhorst committed Oct 15, 2013
Showing with 11 additions and 17 deletions.
  1. +11 −17 www/softkeyboard.js
View
@@ -1,30 +1,24 @@
-(function( cordova ) {
+function SoftKeyboard() {}
- function SoftKeyboard() {}
-
- SoftKeyboard.prototype.show = function(win, fail) {
- return cordova.exec(
+SoftKeyboard.prototype.show = function(win, fail) {
+ return cordova.exec(
function (args) { if(win !== undefined) { win(args); } },
function (args) { if(fail !== undefined) { fail(args); } },
"SoftKeyboard", "show", []);
- };
+};
- SoftKeyboard.prototype.hide = function(win, fail) {
- return cordova.exec(
+SoftKeyboard.prototype.hide = function(win, fail) {
+ return cordova.exec(
function (args) { if(win !== undefined) { win(args); } },
function (args) { if(fail !== undefined) { fail(args); } },
"SoftKeyboard", "hide", []);
- };
+};
- SoftKeyboard.prototype.isShowing = function(win, fail) {
- return cordova.exec(
+SoftKeyboard.prototype.isShowing = function(win, fail) {
+ return cordova.exec(
function (args) { if(win !== undefined) { win(args); } },
function (args) { if(fail !== undefined) { fail(args); } },
"SoftKeyboard", "isShowing", []);
- };
-
- if (!window.SoftKeyboard) {
- window.SoftKeyboard = new SoftKeyboard();
- }
+};
-})( window.cordova );
+module.exports = new SoftKeyboard();

0 comments on commit ff940d3

Please sign in to comment.