diff --git a/README.md b/README.md index bff528e..76bff2a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -jQuery Ajax Reviver Plugin - v1.1 - 06/13/2012 +jQuery Ajax Reviver Plugin - v1.2 - 06/19/2012 ============================================== Copyright (c) 2012 Francois Lafortune, @quickredfox diff --git a/jquery-ajax-reviver-1.1.js b/jquery-ajax-reviver-1.2.js similarity index 96% rename from jquery-ajax-reviver-1.1.js rename to jquery-ajax-reviver-1.2.js index f7d6e58..c3065ea 100644 --- a/jquery-ajax-reviver-1.1.js +++ b/jquery-ajax-reviver-1.2.js @@ -1,5 +1,5 @@ /* -* jQuery Ajax Reviver Plugin - v1.1 - 06/13/2012 +* jQuery Ajax Reviver Plugin - v1.2 - 06/19/2012 * * Copyright (c) 2012 "Quickredfox" Francois Lafortune * Licensed under the same conditions as jQuery itself. @@ -62,9 +62,10 @@ return Array.prototype.push.apply( collection, cast.apply( null, args ) ); } + // Capture 'json' dataType requests and tack-on revivers if wanted. $.ajaxPrefilter( 'json', function(options, original, xhr) { - if (original.revivers) { + if (original.revivers || options.revivers ) { options.revivers = $.ajaxSettings.revivers; if( original.revivers !== true ){ add( options.revivers, original.revivers ); diff --git a/test/index.html b/test/index.html index e19fee4..93e92b0 100644 --- a/test/index.html +++ b/test/index.html @@ -8,7 +8,7 @@ - +