All pastes #2118202 Raw Edit

Something

public text v1 · immutable
#2118202 ·published 2012-02-12 04:23 UTC
rendered paste body
        linkClicked: function(inSender, inEvent) 
        {
            if(typeof blackberry !== "undefined" && inEvent.cancelable) // Deal with extraneous clicks from Ripple emulator
                return;
            
            this.log(inSender.url);
            if(window.PalmSystem)
                this.$.AppManService.call( { target: inSender.url } );
            else {
                try {
                    var args = new blackberry.invoke.BrowserArguments(inSender.url);
                    blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
                } catch(err) {
                    try {
                        switch(device.platform.toLowerCase())
                        {
                            case "android":
                                window.plugins.childBrowser.openExternal(inSender.url);
                                break;
                            default:
                                window.open(inSender.url, '_blank');
                        }
                    } catch(err) {
                        window.open(inSender.url, '_blank');
                    }
                }
            }
            return true;
        },