This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var safariDebug = ( navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0 ); | |
if(safariDebug) | |
{ | |
PhoneGap.run_command = function() | |
{ | |
if (!PhoneGap.available || !PhoneGap.queue.ready) | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License | |
Copyright (c) 2010 Jesse MacFadyen | |
[email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | |
persons to whom the Software is furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License | |
Copyright (c) 2010 Jesse MacFadyen, Nitobi Software | |
[email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | |
persons to whom the Software is furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License | |
Copyright (c) 2010 Jesse MacFadyen, Nitobi Software | |
[email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | |
persons to whom the Software is furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@destObj :Object to decorate | |
@propName :String name of | |
@className :Class to use as the decorator source | |
*/ | |
function decorate(destObj,propName,className) | |
{ | |
// are we working with an instance? | |
if(typeof destObj == "object") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Class = {}; | |
Class.namespace = function(ns,value) | |
{ | |
var nsArr = ns.split("."); | |
var obj = window; | |
var prop; | |
for(var n=0; n < nsArr.length-1; n++) | |
{ | |
prop = nsArr[n]; | |
if(!obj[prop]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MYPROJECT_AppDelegate : PhoneGapDelegate { | |
NSString* invokeString; | |
} | |
@property (copy) NSString* invokeString; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// perform any custom startup stuff you need to ... | |
// process your launch options | |
NSArray *keyArray = [launchOptions allKeys]; | |
if ([launchOptions objectForKey:[keyArray objectAtIndex:0]]!=nil) | |
{ | |
// we store the string, so we can use it later, after the webView loads | |
NSURL *url = [launchOptions objectForKey:[keyArray objectAtIndex:0]]; | |
self.invokeString = [url absoluteString]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8" src="GoogleAnalyticsPlugin.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var googleAnalytics; | |
function onBodyLoad() | |
{ | |
document.addEventListener("deviceready",onDeviceReady,false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function deviceready() { | |
var e = document.createEvent('Events') | |
e.initEvent('deviceready') | |
document.dispatchEvent(e) | |
} | |
if (PhoneGap) { | |
PhoneGap.exec = function(success, fail, service, action, args){ | |
var callbackId = service + PhoneGap.callbackId++; | |
if (typeof success == "function" || typeof fail == "function") { |
OlderNewer