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
Ti.App.addEventListener("resume", function(){ | |
Ti.API.info("Resume Event Fired"); | |
}); | |
Ti.App.addEventListener("resumed", function(){ | |
Ti.API.info("Resumed Event Fired"); | |
}); | |
Ti.App.iOS.addEventListener("shortcutitemclick", function(e){ |
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 win = Titanium.UI.createWindow({ | |
title:'Demo', backgroundColor:'#fff',layout:'vertical' | |
}); | |
var btnSpotLightSupported = Ti.UI.createButton({ | |
top:20, title:'Is SpotLight Supported?', | |
height:60, width:Ti.UI.FILL | |
}); | |
win.add(btnSpotLightSupported); |
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
find-up() { | |
local path=$(pwd) | |
while [[ "$path" != "" && ! -e "$path/$1" ]]; do | |
path=${path%/*} | |
done | |
if [ "$path" != "" ] | |
then | |
echo "$path" | |
fi | |
} |
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
$.recordCount.value = 99 |
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
######################################## | |
# # | |
# Important Note # | |
# # | |
# When running calabash-ios tests at # | |
# www.lesspainful.com # | |
# this file will be overwritten by # | |
# a file which automates # | |
# app launch on devices. # | |
# # |
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
Titanium.App.addEventListener("playvideo", function (e) { | |
var win11 = Titanium.UI.createWindow({ | |
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
title: "Video", | |
zIndex: 222222 | |
}); | |
var activeMovie = Titanium.Media.createVideoPlayer({ | |
fullscreen: !0, | |
autoplay: !0, |
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
/*! Socket.IO.js build:0.9.6, development. Copyright(c) 2011 LearnBoost <[email protected]> MIT Licensed */ | |
/** | |
* Originally Ported to titanium by Jordi Domenech <[email protected]> | |
* source: https://github.com/iamyellow/socket.io-client | |
*/ | |
this.io = {}; | |
module.exports = this.io; | |
/** |
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
// Remove any <script> tags | |
// Go backwards to factor in nested script tags, e.g. <script>document.write('<script></script>')</script> | |
$offset = strlen($html) - 9; // Minimum match length is 9 chars (<script/>) | |
for ($offset; $offset >= 0; $offset--) | |
{ | |
$substr = substr($html, $offset); | |
if (preg_match('/^<script[^>]+?\/>|^<script(?:.|\s)*?\/script>/im', $substr, $match)) | |
{ | |
$html = substr($html, 0, $offset).substr($html, $offset+strlen($match[0])); | |
} |