summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos')
-rw-r--r--[-rwxr-xr-x]StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js24
1 files changed, 10 insertions, 14 deletions
diff --git a/StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js b/StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js
index f0d44c12..c09e3583 100755..100644
--- a/StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js
+++ b/StoneIsland/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js
@@ -21,9 +21,7 @@
// https://developer.mozilla.org/en-US/docs/WebAPI/Browser
-var cordova = require('cordova'),
- channel = require('cordova/channel'),
- modulemapper = require('cordova/modulemapper');
+var modulemapper = require('cordova/modulemapper');
var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open');
var browserWrap;
@@ -49,9 +47,7 @@ var IABExecs = {
var strUrl = args[0],
target = args[1],
features_string = args[2] || "location=yes", //location=yes is default
- features = {},
- url,
- elem;
+ features = {};
var features_list = features_string.split(',');
features_list.forEach(function(feature) {
@@ -61,7 +57,7 @@ var IABExecs = {
} else if (tup[1] == 'no') {
tup[1] = false;
} else {
- var number = parseInt(tup[1]);
+ var number = parseInt(tup[1]);
if (!isNaN(number)) {
tup[1] = number;
}
@@ -115,7 +111,7 @@ var IABExecs = {
back.classList.add('inAppBrowserBack');
forward.classList.add('inAppBrowserForward');
- function checkForwardBackward() {
+ var checkForwardBackward = function () {
var backReq = browserElem.getCanGoBack();
backReq.onsuccess = function() {
if (this.result) {
@@ -123,7 +119,7 @@ var IABExecs = {
} else {
back.classList.add('disabled');
}
- }
+ };
var forwardReq = browserElem.getCanGoForward();
forwardReq.onsuccess = function() {
if (this.result) {
@@ -131,7 +127,7 @@ var IABExecs = {
} else {
forward.classList.add('disabled');
}
- }
+ };
};
browserElem.addEventListener('mozbrowserloadend', checkForwardBackward);
@@ -163,16 +159,16 @@ var IABExecs = {
win({
type:'loadstart',
url : e.detail
- })
+ });
}, false);
browserElem.addEventListener('mozbrowserloadend', function(e){
- win({type:'loadstop'})
+ win({type:'loadstop'});
}, false);
browserElem.addEventListener('mozbrowsererror', function(e){
- win({type:'loaderror'})
+ win({type:'loaderror'});
}, false);
browserElem.addEventListener('mozbrowserclose', function(e){
- win({type:'exit'})
+ win({type:'exit'});
}, false);
} else {
window.location = strUrl;