tt-rss/plugins/af_sort_bayes/init.js

38 lines
793 B
JavaScript
Raw Normal View History

function bayesTrain(id, train_up) {
try {
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=trainArticle&article_id=" + param_escape(id) +
"&train_up=" + train_up;
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
notify(transport.responseText);
} });
} catch (e) {
exception_error("showTrgmRelated", e);
}
}
2015-06-17 15:50:21 +02:00
function bayesClearDatabase() {
try {
if (confirm(__("Clear classifier database?"))) {
var query = "backend.php?op=pluginhandler&plugin=af_sort_bayes&method=clearDatabase";
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function (transport) {
notify(transport.responseText);
}
});
}
} catch (e) {
exception_error("showTrgmRelated", e);
}
}