<commit_before>//
//  <NAME>
//
//  Created by <NAME> on 06/07/15.
//
//

var argscheck = require('cordova/argscheck'),
    exec      = require('cordova/exec');

function OpenUrlExt () {};

OpenUrlExt.prototype = {

    open: function (url, success, failure)
    {
    	var urlHashed = encodeURI(url);
    	var deviceType = (navigator.userAgent.match(/iPad/i))  == "iPad" ? "iPad" : (navigator.userAgent.match(/iPhone/i))  == "iPhone" ? "iPhone" : (navigator.userAgent.match(/Android/i)) == "Android" ? "Android" : (navigator.userAgent.match(/BlackBerry/i)) == "BlackBerry" ? "BlackBerry" : "null";
    	if(deviceType == "Android"){
    		if(navigator)
    			navigator.app.loadUrl(urlHashed, {openExternal : true});
    		else {
    			window.open(urlHashed, '_system');
    		}
    	} else {
    		exec(success, failure, 'OpenUrlExt', 'open', url);
    	}
    }
};

module.exports = new OpenUrlExt();<commit_msg>bugfix<commit_after>//
//  <NAME>
//
//  Created by <NAME> on 06/07/15.
//
//

var argscheck = require('cordova/argscheck'),
    exec      = require('cordova/exec');

function OpenUrlExt () {};

OpenUrlExt.prototype = {

    open: function (url, success, failure)
    {
    	var urlHashed = encodeURI(url);
    	var deviceType = (navigator.userAgent.match(/iPad/i))  == "iPad" ? "iPad" : (navigator.userAgent.match(/iPhone/i))  == "iPhone" ? "iPhone" : (navigator.userAgent.match(/Android/i)) == "Android" ? "Android" : (navigator.userAgent.match(/BlackBerry/i)) == "BlackBerry" ? "BlackBerry" : "null";
    	if(deviceType == "Android"){
    		if(navigator)
    			navigator.app.loadUrl(urlHashed, {openExternal : true});
    		else {
    			window.open(urlHashed, '_system');
    		}
    	} else {
    		exec(success, failure, 'OpenUrlExt', 'open', [url]);
    	}
    }
};

module.exports = new OpenUrlExt();
{'fraction_non_alphanumeric': 0.18869994514536478, 'fraction_numerical': 0.006582556226001097, 'mean_word_length': 3.098876404494382, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3052588', 'n_tokens_mistral': 685, 'n_tokens_neox': 660, 'n_words': 111}