var newnum = 0; function appendFilter(id, field, regex, type, match){ console.log("id: "+id+" field: "+field+" regex: "+regex+" type: "+type); var t = $("div#filters table tbody"); var a = ""; a += ""; a += ""; a += ""; a += ""; a += ""; a += ""; a += ""; a += ""; a += ""; a += ""; if (!(""+id).match(/^new/)){ a += ""; } a += ""; t.append(a); if (field){ t.find("#field_"+id).val(field); } if (regex){ t.find("#regex_"+id).val(regex); } if (type){ t.find("#type_"+id).val(type); } if (match){ t.find("#match_"+id).val(match); } } function RSSTootalizerOnReady(){ $("#rawentries").hide(); $("a#togglerawentries").on("click", function(){ $("#rawentries").toggle(); }); $("a#addfilter").on("click", function(){ newnum++; appendFilter("new"+newnum); }); $("a#savefilters").one("click", function(){ document.forms.form_filters.submit(); }); for (i=0; i