Skip to content

Instantly share code, notes, and snippets.

View blankenshipb's full-sized avatar

Brian Blankenship blankenshipb

View GitHub Profile
@tonylukasavage
tonylukasavage / index.xml
Created August 30, 2012 14:36
Alloy "platform" attribute
<Alloy>
<Window>
<!-- all platforms -->
<View/>
<!-- only on ios will this element, and all its subviews, appear -->
<View platform="ios">
<View/>
</View>
@dawsontoth
dawsontoth / app.js
Created February 4, 2011 23:21
CSS Injection on External Websites using Appcelerator Titanium
// create our web view
var win = Ti.UI.createWindow({ backgroundColor: "#fff" });
var web = Ti.UI.createWebView({ url: "http://chicago.craigslist.org/" });
// inject our css when the web view finishes loading (because we need to inject into the head element)
web.addEventListener('load', function () {
// first, specify the CSS file that we should load
var cssFileName = 'styles.css';
// read in the contents
var cssFromFile = Ti.Filesystem.getFile(cssFileName);