diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-08 02:38:54 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-08 02:38:54 -0400 |
commit | 32a79523bbb4051a9a528a148a6db82e9fdd20d6 (patch) | |
tree | c97716fe77965112827e159aafe677fc88b606b2 /underlays/openid-selector | |
parent | 541298e66892300f9d98d089c59b7ad837e49016 (diff) |
add gmail button
It uses the google profile openid url, which results in a nicer openid
than the o8/id url.
Diffstat (limited to 'underlays/openid-selector')
-rw-r--r-- | underlays/openid-selector/ikiwiki/openid/openid-jquery.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js index 59a59c084..544ba8936 100644 --- a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js +++ b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js @@ -30,18 +30,24 @@ var providers_small = { label: 'Enter your Livejournal username:', url: 'http://{username}.livejournal.com/' }, - flickr: { - name: 'Flickr', - icon: 'http://flickr.com/favicon.ico', - label: 'Enter your Flickr username:', - url: 'http://flickr.com/photos/{username}/' - }, wordpress: { name: 'Wordpress', icon: 'https://ddgw.s3.amazonaws.com/wordpress.org.ico', label: 'Enter your Wordpress.com username:', url: 'http://{username}.wordpress.com/' }, + gmail: { + name: 'Gmail', + icon: 'http://mail.google.com/favicon.ico', + label: 'Enter your Gmail address:', + url: 'http://google.com/profiles/{email_username}/' + }, + flickr: { + name: 'Flickr', + icon: 'http://www.flickr.com/favicon.ico', + label: 'Enter your Flickr username:', + url: 'http://flickr.com/photos/{username}/' + }, myopenid: { name: 'MyOpenID', icon: 'http://myopenid.com/favicon.ico', @@ -172,6 +178,7 @@ var openid = { var url = openid.provider_url; if (url) { url = url.replace('{username}', $('#openid_username').val()); + url = url.replace('{email_username}', $('#openid_username').val().split('@')[0]); openid.setOpenIdUrl(url); } if(openid.ajaxHandler) { |