Created
March 28, 2011 21:13
-
-
Save mcepl/891295 to your computer and use it in GitHub Desktop.
Demand OpenID on the current (or other) page
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
CmdUtils.CreateCommand({ | |
names: ["demand"], | |
description: "Demand OpenID to be used for the current page", | |
author: { | |
name: "Matej Cepl", | |
email: "mcepl@redhat.com" | |
}, | |
license: "MIT/X11", | |
icon: "http://www.mozilla.com/favicon.ico", | |
arguments: [{ | |
role: "object", | |
nountype: noun_type_url, | |
label: "URL" | |
}], | |
execute: function execute(args) { | |
var baseURL = 'http://openid-please.appspot.com/add'; | |
var params = { | |
bookmarklet: true, | |
v: 2, | |
k: "your-key", // FIXME!!! You need to fill here hash from the bookmarklet | |
url: args.object.text | |
}; | |
jQuery.get(baseURL, params, function(ret, textStatus) { | |
displayMessage(textStatus); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment