Skip to content

Instantly share code, notes, and snippets.

@rsanchez1
rsanchez1 / gist:1063527
Created July 4, 2011 15:57
Modal Dialog Login
enyo.kind({
name: "Login",
kind: "ModalDialog",
caption: "Login",
events: {
onConfirm: "",
onCancel: ""
},
components: [
{kind: "RowGroup", caption: "EMAIL", components: [
@rsanchez1
rsanchez1 / input.js
Created August 3, 2011 13:46
enyo key input example
{kind: "Input", name: "email", hint: "", value: "", onkeypress: "inputChange"},
inputChange: function(source, event) {
enyo.log("called the input change event");
if (event.keyCode == 13) {
enyo.log("pressed enter button, submit form");
}
}
@rsanchez1
rsanchez1 / gist:2414464
Created April 18, 2012 15:48
touchfeeds manisfest.json permissions
"permissions" : [
"tabs",
"notifications",
"https://www.google.com/accounts/ClientLogin*",
"http://text.readitlaterlist.com/v2/text*",
"http://www.google.com/reader/api/0/*",
"https://accounts.google.com/o/oauth2/token"
],
@rsanchez1
rsanchez1 / login.js
Created April 18, 2012 15:56
tab creation for authentication in touchfeeds
authorizeClick: function() {
var url = "https://accounts.google.com/o/oauth2/auth?client_id=663702953261.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=http://www.google.com/reader/api/0&response_type=code";
chrome.tabs.create({url: url}, function(tab) {this.tabId = tab.id; globalTab = tab;}.bind(this));
this.interval = window.setInterval(this.checkOAuthTitle.bind(this), 1000);
},
checkOAuthTitle: function() {
chrome.tabs.get(this.tabId, function(tabInfo) {
var match = tabInfo.title.split("=");