jekyll-attendease 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +21 -0
  2. data/lib/jekyll-attendease.rb +5 -1
  3. metadata +2 -2
data/README.md CHANGED
@@ -71,6 +71,27 @@ This is simple a div with the id `attendease-auth-action`, maybe more in the fut
71
71
 
72
72
  `{% attendease_auth_action %}`
73
73
 
74
+ ## Listening for the auth callback
75
+
76
+ In your site's Javascript, do something like this:
77
+
78
+ ``` javascript
79
+ JekyllAttendease.onLoginCheck(function(e)
80
+ {
81
+ if (e.data.loggedin)
82
+ {
83
+ // do some cool stuff!
84
+ var account = e.data.account;
85
+ // console.log(account);
86
+ }
87
+
88
+ // And we have some URLs for you!
89
+ // e.data.loginURL
90
+ // e.data.logoutURL
91
+ // e.data.accountURL
92
+ });
93
+ ```
94
+
74
95
  ## Contributing
75
96
 
76
97
  1. Fork it
@@ -287,7 +287,11 @@ var JekyllAttendease = {
287
287
  }
288
288
  else
289
289
  {
290
- document.getElementById("attendease-auth-action").innerHTML = '<a class="attendease-auth-logout" href="/attendease/login">Login</a>';
290
+ authActionElement = document.getElementById("attendease-auth-action");
291
+ if (authActionElement)
292
+ {
293
+ authActionElement.innerHTML = '<a class="attendease-auth-logout" href="/attendease/login">Login</a>';
294
+ }
291
295
  }
292
296
 
293
297
  data = { loggedin: this.attendease_logged_in, account: accountObject, loginURL: "/attendease/login", logoutURL: "/attendease/logout", accountURL: "/attendease/account" };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-attendease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-08-22 00:00:00.000000000 Z
14
+ date: 2013-08-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: httparty