diff --git a/plugin.xml b/plugin.xml
index ee3cf72..6905c08 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/tests/tests.js b/tests/tests.js
index 00194cf..caab1f9 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -1,4 +1,3 @@
-cordova.define("cordova-plugin-webserver-tests.tests", function(require, exports, module) {
exports.defineAutoTests = function() {
describe('Webserver (window.webserver)', function () {
@@ -91,5 +90,3 @@ exports.defineManualTests = function(contentEl, createActionButton) {
);
});
};
-
-});
diff --git a/webserver.js b/webserver.js
index ef1efc9..a0aaeae 100644
--- a/webserver.js
+++ b/webserver.js
@@ -1,49 +1,46 @@
-cordova.define("cordova-plugin-webserver.webserver", function(require, exports, module) {
- var WEBSERVER_CLASS = "Webserver";
+var WEBSERVER_CLASS = "Webserver";
- exports.start = function(success_callback, error_callback, port) {
- cordova.exec(
- success_callback,
- error_callback,
- WEBSERVER_CLASS,
- "start",
- [port]
- );
- };
-
- exports.onRequest = function(success_callback) {
- cordova.exec(
- success_callback,
- function(error) {console.error(error)},
- WEBSERVER_CLASS,
- "onRequest",
- []
- );
- };
-
- exports.sendResponse = function(
- requestId,
- params,
+exports.start = function(success_callback, error_callback, port) {
+ cordova.exec(
success_callback,
- error_callback
- ) {
- cordova.exec(
- success_callback,
- error_callback,
- WEBSERVER_CLASS,
- "sendResponse",
- [requestId, params]
- );
- };
+ error_callback,
+ WEBSERVER_CLASS,
+ "start",
+ [port]
+ );
+};
- exports.stop = function(success_callback, error_callback) {
- cordova.exec(
- success_callback,
- error_callback,
- WEBSERVER_CLASS,
- "stop",
- []
- );
- };
+exports.onRequest = function(success_callback) {
+ cordova.exec(
+ success_callback,
+ function(error) {console.error(error)},
+ WEBSERVER_CLASS,
+ "onRequest",
+ []
+ );
+};
-});
+exports.sendResponse = function(
+ requestId,
+ params,
+ success_callback,
+ error_callback
+) {
+ cordova.exec(
+ success_callback,
+ error_callback,
+ WEBSERVER_CLASS,
+ "sendResponse",
+ [requestId, params]
+ );
+};
+
+exports.stop = function(success_callback, error_callback) {
+ cordova.exec(
+ success_callback,
+ error_callback,
+ WEBSERVER_CLASS,
+ "stop",
+ []
+ );
+};