Browse Source

Updated builds.

jfh 8 years ago
parent
commit
0d411f761c
2 changed files with 19 additions and 6 deletions
  1. 18
    5
      build/dist/jquery.jfeed.js
  2. 1
    1
      build/dist/jquery.jfeed.pack.js

+ 18
- 5
build/dist/jquery.jfeed.js View File

@@ -12,13 +12,27 @@ jQuery.getFeed = function(options) {
12 12
         data: null,
13 13
         cache: true,
14 14
         success: null,
15
-        failure: null
15
+        failure: null,
16
+        error: null,
17
+        global: true
16 18
 
17 19
     }, options);
18 20
 
19 21
     if (options.url) {
22
+        
23
+        if (jQuery.isFunction(options.failure) && jQuery.type(options.error)==='null') {
24
+          // Handle legacy failure option
25
+          options.error = function(xhr, msg, e){
26
+            options.failure(msg, e);
27
+          }
28
+        } else if (jQuery.type(options.failure) === jQuery.type(options.error) === 'null') {
29
+          // Default error behavior if failure & error both unspecified
30
+          options.error = function(xhr, msg, e){
31
+            window.console&&console.log('getFeed failed to load feed', xhr, msg, e);
32
+          }
33
+        }
20 34
 
21
-        $.ajax({
35
+        return $.ajax({
22 36
             type: 'GET',
23 37
             url: options.url,
24 38
             data: options.data,
@@ -28,9 +42,8 @@ jQuery.getFeed = function(options) {
28 42
                 var feed = new JFeed(xml);
29 43
                 if (jQuery.isFunction(options.success)) options.success(feed);
30 44
             },
31
-            error: function (xhr, msg, e) {
32
-                if (jQuery.isFunction(options.failure)) options.failure(msg, e);
33
-            }
45
+            error: options.error,
46
+            global: options.global
34 47
         });
35 48
     }
36 49
 };

+ 1
- 1
build/dist/jquery.jfeed.pack.js View File

@@ -1 +1 @@
1
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.1b=a(b){b=2.N({w:x,H:x,G:1a,v:x,F:x},b);h(b.w){$.19({u:\'18\',w:b.w,H:b.H,G:b.G,17:(2.P.O)?"6":"4",v:a(4){f i=k E(4);h(2.S(b.v))b.v(i)},16:a(15,R,e){h(2.S(b.F))b.F(R,e)}})}};a E(4){h(4)3.Q(4)};E.s={u:\'\',m:\'\',d:\'\',c:\'\',j:\'\',Q:a(4){h(2.P.O){f D=k 14("13.12");D.11(4);4=D}h(2(\'8\',4).A==1){3.u=\'z\';f t=k B(4)}L h(2(\'i\',4).A==1){3.u=\'10\';f t=k C(4)}h(t)2.N(3,t)}};a p(){};p.s={d:\'\',c:\'\',j:\'\',l:\'\',o:\'\'};a C(4){3.r(4)};C.s={r:a(4){f 8=2(\'i\',4).9(0);3.m=\'1.0\';3.d=2(8).5(\'d:g\').6();3.c=2(8).5(\'c:g\').q(\'M\');3.j=2(8).5(\'Z:g\').6();3.y=2(8).q(\'4:Y\');3.l=2(8).5(\'l:g\').6();3.n=k K();f i=3;2(\'X\',4).J(a(){f 7=k p();7.d=2(3).5(\'d\').9(0).6();7.c=2(3).5(\'c\').9(0).q(\'M\');7.j=2(3).5(\'W\').9(0).6();7.l=2(3).5(\'l\').9(0).6();7.o=2(3).5(\'o\').9(0).6();i.n.I(7)})}};a B(4){3.r(4)};B.s={r:a(4){h(2(\'z\',4).A==0)3.m=\'1.0\';L 3.m=2(\'z\',4).9(0).q(\'m\');f 8=2(\'8\',4).9(0);3.d=2(8).5(\'d:g\').6();3.c=2(8).5(\'c:g\').6();3.j=2(8).5(\'j:g\').6();3.y=2(8).5(\'y:g\').6();3.l=2(8).5(\'V:g\').6();3.n=k K();f i=3;2(\'7\',4).J(a(){f 7=k p();7.d=2(3).5(\'d\').9(0).6();7.c=2(3).5(\'c\').9(0).6();7.j=2(3).5(\'j\').9(0).6();7.l=2(3).5(\'U\').9(0).6();7.o=2(3).5(\'T\').9(0).6();i.n.I(7)})}};',62,74,'||jQuery|this|xml|find|text|item|channel|eq|function|options|link|title||var|first|if|feed|description|new|updated|version|items|id|JFeedItem|attr|_parse|prototype|feedClass|type|success|url|null|language|rss|length|JRss|JAtom|xmlDoc|JFeed|failure|cache|data|push|each|Array|else|href|extend|msie|browser|parse|msg|isFunction|guid|pubDate|lastBuildDate|content|entry|lang|subtitle|atom|loadXML|XMLDOM|Microsoft|ActiveXObject|xhr|error|dataType|GET|ajax|true|getFeed'.split('|')))
1
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.W=b(7){7=2.R({y:o,L:o,K:Y,x:o,A:o,n:o,J:Y},7);g(7.y){g(2.V(7.A)&&2.m(7.n)===\'o\'){7.n=b(M,z,e){7.A(z,e)}}D g(2.m(7.A)===2.m(7.n)===\'o\'){7.n=b(M,z,e){1j.X&&X.1i(\'W 1h 1g 1f h\',M,z,e)}}1e $.1d({m:\'1c\',y:7.y,L:7.L,K:7.K,1b:(2.T.S)?"6":"4",x:b(4){f h=k I(4);g(2.V(7.x))7.x(h)},n:7.n,J:7.J})}};b I(4){g(4)3.U(4)};I.v={m:\'\',p:\'\',d:\'\',c:\'\',j:\'\',U:b(4){g(2.T.S){f H=k 1a("19.18");H.17(4);4=H}g(2(\'9\',4).E==1){3.m=\'C\';f w=k F(4)}D g(2(\'h\',4).E==1){3.m=\'16\';f w=k G(4)}g(w)2.R(3,w)}};b s(){};s.v={d:\'\',c:\'\',j:\'\',l:\'\',r:\'\'};b G(4){3.u(4)};G.v={u:b(4){f 9=2(\'h\',4).a(0);3.p=\'1.0\';3.d=2(9).5(\'d:i\').6();3.c=2(9).5(\'c:i\').t(\'Q\');3.j=2(9).5(\'15:i\').6();3.B=2(9).t(\'4:14\');3.l=2(9).5(\'l:i\').6();3.q=k P();f h=3;2(\'13\',4).O(b(){f 8=k s();8.d=2(3).5(\'d\').a(0).6();8.c=2(3).5(\'c\').a(0).t(\'Q\');8.j=2(3).5(\'12\').a(0).6();8.l=2(3).5(\'l\').a(0).6();8.r=2(3).5(\'r\').a(0).6();h.q.N(8)})}};b F(4){3.u(4)};F.v={u:b(4){g(2(\'C\',4).E==0)3.p=\'1.0\';D 3.p=2(\'C\',4).a(0).t(\'p\');f 9=2(\'9\',4).a(0);3.d=2(9).5(\'d:i\').6();3.c=2(9).5(\'c:i\').6();3.j=2(9).5(\'j:i\').6();3.B=2(9).5(\'B:i\').6();3.l=2(9).5(\'11:i\').6();3.q=k P();f h=3;2(\'8\',4).O(b(){f 8=k s();8.d=2(3).5(\'d\').a(0).6();8.c=2(3).5(\'c\').a(0).6();8.j=2(3).5(\'j\').a(0).6();8.l=2(3).5(\'10\').a(0).6();8.r=2(3).5(\'Z\').a(0).6();h.q.N(8)})}};',62,82,'||jQuery|this|xml|find|text|options|item|channel|eq|function|link|title||var|if|feed|first|description|new|updated|type|error|null|version|items|id|JFeedItem|attr|_parse|prototype|feedClass|success|url|msg|failure|language|rss|else|length|JRss|JAtom|xmlDoc|JFeed|global|cache|data|xhr|push|each|Array|href|extend|msie|browser|parse|isFunction|getFeed|console|true|guid|pubDate|lastBuildDate|content|entry|lang|subtitle|atom|loadXML|XMLDOM|Microsoft|ActiveXObject|dataType|GET|ajax|return|load|to|failed|log|window'.split('|')))

Loading…
Cancel
Save