}
};
+ that.visitCategories = function(callback) {
+ for (var i in m_list) {
+ var filter = m_list[i];
+ if (filter.type === 'category') {
+ callback(filter.id);
+ }
+ }
+ };
+
that.removeMatching = function(matchFn) {
var newList = [];
for (var i in m_list) {
return res;
}
+ that.pp2catLimit = function() {
+ var res = "";
+
+ that.visitCategories(function(id) {
+ if (res) res += ",";
+ res += "category~" + id.replace(/[\\|,]/g, '\\$&');
+ });
+ return res;
+ }
+
return that;
}