summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/www/script/jquery.couch.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 292e3378..3dc5d1c5 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -231,7 +231,7 @@
);
},
changes: function(since, options) {
- options = {} || options;
+ options = options || {};
// set up the promise object within a closure for this handler
var db = this, active = true, listeners = [], promise = {
onChange : function(fun) {
@@ -257,8 +257,13 @@
};
// actually make the changes request
function getChangesSince(seq) {
+ var opts = {};
+ $.extend(opts, options, {
+ feed : "longpoll",
+ since : seq
+ });
ajax(
- {url: db.uri + "_changes?feed=longpoll&since="+seq},
+ {url: db.uri + "_changes"+encodeOptions(opts)},
options,
"Error connecting to "+db.uri+"/_changes."
);