This file contains hidden or 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(){ | |
| var configPath = "../config.xml"; | |
| if( ["android","amazon-fireos"].indexOf(cordova.platformId) > -1 ) { | |
| configPath = "../../android_res/xml/config.xml"; | |
| } | |
| else if( ["blackberry10","firefoxos"].indexOf(cordova.platformId) > -1 ) { | |
| configPath = "config.xml"; | |
| } | |
| Object.defineProperty(cordova,'configPath', {enumerable: true, value: configPath }); |
This file contains hidden or 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
| // callback handler for a call to cordova camera.getPicture with return type of FILE_URL | |
| function gotPhoto(res) { | |
| var img = document.createElement("img"); | |
| img.onload = function () { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = img.width; | |
| canvas.height = img.height; | |
| var ctx = canvas.getContext('2d'); |
This file contains hidden or 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
| PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; | |
| if (frame != null) | |
| { | |
| PhoneApplicationPage page = frame.Content as PhoneApplicationPage; | |
| if (page != null) | |
| { | |
| SystemTray.SetIsVisible(page, false); | |
| } | |
| } |
This file contains hidden or 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(window){ | |
| var repStr = "linear-gradient( ANGLEdeg, rgba(255,255,255,0.2), rgba(255,255,255,0.1) 400px, rgba(0,0,0,0) 401px)"; | |
| var sheen = document.createElement("div"); | |
| var props = { | |
| position:"absolute", | |
| zIndex:"666666", | |
| width:"100%", | |
| height:"100%", |
This file contains hidden or 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 _it = it; | |
| it = function (text,funk) { | |
| if (text.indexOf("filetransfer.spec.5") == 0) { | |
| return _it(text, funk); | |
| } | |
| else { | |
| console.log("Skipping Test : " + text); | |
| } | |
| } |
This file contains hidden or 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(){ | |
| var VERSION = '2.2.0', | |
| currentScript = 'cordova-' + VERSION + '.js', | |
| scripts = document.getElementsByTagName('script'); | |
| for (var n = 0; n < scripts.length; n++) { | |
| if (scripts[n].src.indexOf('cordova-current.js') > -1) { | |
| var cordovaPath = scripts[n].src.replace('cordova-current.js', currentScript); | |
| var scriptElem = document.createElement("script"); |
This file contains hidden or 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
| #!/usr/bin/env node | |
| var et = require('elementtree'); | |
| var fs = require('fs'); | |
| var docStr = fs.readFileSync('test1.xml','utf8'); | |
| var projDoc = new et.ElementTree(et.XML(docStr)); | |
| console.log("projDoc.getroot = " + projDoc.getroot()); |
This file contains hidden or 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(win, doc){ | |
| var onDeviceReady = function() { | |
| console.log('Cordova initialized'); | |
| doc.getElementById('infoTag').innerHTML = 'Hello world from Cordova ' + device.cordova; | |
| } | |
| doc.addEventListener('deviceready', onDeviceReady, true); | |
| })(window,document); |
This file contains hidden or 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
| Cordova.commandProxies = {}; | |
| Cordova.regCommandProxy = function(service,action,funk) | |
| { | |
| Cordova.commandProxies[service + action] = funk; | |
| }; | |
| // possibly an un-reg as well ... |
This file contains hidden or 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
| document.getElementById("container").innerHTML=""; | |
| var con = document.getElementById("container"); | |
| var ul = "<ul>"; | |
| var i; | |
| for (i = 0; i < 100; i++) { | |
| var li = "<li>hello world NoFramework</li>"; | |
| ul += li; | |
| } | |
| ul += "</ul>"; |