mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 07:15:55 +00:00
remove PTITLE kludge; use ajax
This commit is contained in:
@@ -1216,20 +1216,31 @@ function quickAddFilter() {
|
||||
var lh = dojo.connect(dialog, "onLoad", function(){
|
||||
dojo.disconnect(lh);
|
||||
|
||||
var title = $("PTITLE-FULL-" + getActiveArticleId());
|
||||
var query = "op=rpc&method=getlinktitlebyid&id=" + getActiveArticleId();
|
||||
|
||||
if (title || getActiveFeedId() || activeFeedIsCat()) {
|
||||
if (title) title = title.innerHTML;
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: query,
|
||||
onComplete: function(transport) {
|
||||
var reply = JSON.parse(transport.responseText);
|
||||
|
||||
console.log(title + " " + getActiveFeedId());
|
||||
var title = false;
|
||||
|
||||
var feed_id = activeFeedIsCat() ? 'CAT:' + parseInt(getActiveFeedId()) :
|
||||
getActiveFeedId();
|
||||
if (reply && reply) title = reply.title;
|
||||
|
||||
var rule = { reg_exp: title, feed_id: feed_id, filter_type: 1 };
|
||||
if (title || getActiveFeedId() || activeFeedIsCat()) {
|
||||
|
||||
console.log(title + " " + getActiveFeedId());
|
||||
|
||||
var feed_id = activeFeedIsCat() ? 'CAT:' + parseInt(getActiveFeedId()) :
|
||||
getActiveFeedId();
|
||||
|
||||
var rule = { reg_exp: title, feed_id: feed_id, filter_type: 1 };
|
||||
|
||||
addFilterRule(null, dojo.toJson(rule));
|
||||
}
|
||||
|
||||
} });
|
||||
|
||||
addFilterRule(null, dojo.toJson(rule));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user