Permalink
Browse files

Do not replace default $.ajax

  • Loading branch information...
indutny committed Dec 26, 2010
1 parent c57d81b commit e0994ba825e06dd917b5843cb55042128217090f
Showing with 3 additions and 4 deletions.
  1. +3 −4 share/www/script/jquery.couch.js
@@ -15,9 +15,8 @@
// Ajax wrapper for continuous changes
// (since jquery doesn't support them)
- var _ajax = $.ajax;
- $.ajax = function(options) {
- var xhr = _ajax.call(this, options);
+ function chunkedAjax(options) {
+ var xhr = $.ajax(options);
if (!options.chunked || !options.progress) return xhr;
@@ -668,7 +667,7 @@
options = $.extend({successStatus: 200}, options);
ajaxOptions = $.extend({contentType: "application/json"}, ajaxOptions);
errorMessage = errorMessage || "Unknown error";
- return $.ajax($.extend($.extend({
+ return chunkedAjax($.extend($.extend({
type: "GET", dataType: "json", cache : !$.browser.msie,
beforeSend: function(xhr){
if(ajaxOptions && ajaxOptions.headers){

0 comments on commit e0994ba

Please sign in to comment.