1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 10:05:56 +00:00

get rid of vf_hreadf cookie, move data to init-param

This commit is contained in:
Andrew Dolgov
2006-05-23 07:32:22 +01:00
parent 33d13e72e2
commit e8bd0da952
5 changed files with 22 additions and 45 deletions

View File

@@ -783,7 +783,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
}
} else if (child.id.match("FEEDR-")) {
if (getCookie("ttrss_vf_hreadf") == 1) {
if (getInitParam("hide_read_feeds") == 1) {
if (child.className != "feed") {
alert(child.className);
return child.id.replace('FEEDR-', '');
@@ -798,7 +798,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
var feed = list.ownerDocument.getElementById("FEEDR-" + getActiveFeedId());
if (getCookie("ttrss_vf_hreadf") == 1) {
if (getInitParam("hide_read_feeds") == 1) {
unread_only = true;
}
@@ -1098,11 +1098,13 @@ function getInitParam(key) {
}
// TODO: batch mode
function storeInitParam(key, value) {
function storeInitParam(key, value, is_client) {
try {
getMainContext().init_params[key] = value;
new Ajax.Request("backend.php?op=rpc&subop=storeParam&key=" +
param_escape(key) + "&value=" + param_escape(value));
if (!is_client) {
new Ajax.Request("backend.php?op=rpc&subop=storeParam&key=" +
param_escape(key) + "&value=" + param_escape(value));
}
} catch (e) {
exception_error("storeInitParam", e);
}