jquery-facebook 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Jquery
2
2
  module Facebook
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -1,26 +1,25 @@
1
1
  $.facebookInit = function (options) {
2
- var defaults = {
3
- status: true,
4
- cookie: true,
5
- xfbml: true
6
- };
2
+ var defaults = { status: true,
3
+ cookie: true,
4
+ xfbml: true },
5
+ meta = $('meta[property="fb:app_id"]');
7
6
 
8
- var meta = $('meta[property="fb:app_id"]');
9
7
  if (meta.length) {
10
8
  defaults.appId = meta.attr('content');
11
9
  }
12
10
 
13
- window.fbAsyncInit = function() {
11
+ window.fbAsyncInit = function () {
14
12
  FB.init($.extend(defaults, options));
15
13
  $(document).trigger('facebook:init');
16
14
  };
17
15
 
18
- if (!$("div#fb-root").length) {
16
+ if (!$('div#fb-root').length) {
19
17
  $('body').append('<div id="fb-root"></div>');
20
18
  }
21
19
 
22
- var e = document.createElement('script');
23
- e.async = true;
24
- e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
25
- document.getElementById('fb-root').appendChild(e);
26
- }
20
+ $.ajax({
21
+ url: document.location.protocol + '//connect.facebook.net/en_US/all.js',
22
+ dataType: 'script',
23
+ cache: true
24
+ });
25
+ };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-facebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-29 00:00:00.000000000 Z
12
+ date: 2012-11-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Facebook JavaScript SDK unobtrusive loader for jQuery and Rails
15
15
  email: