1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:25:55 +00:00

add hotkey toggle_cdm_expanded (f c)

This commit is contained in:
Andrew Dolgov
2013-03-30 14:28:13 +04:00
parent f940535997
commit 60b88b254c
2 changed files with 16 additions and 1 deletions

View File

@@ -483,6 +483,19 @@ function init() {
window.location.reload();
} });
};
hotkey_actions["toggle_cdm_expanded"] = function() {
notify_progress("Loading, please wait...");
var value = getInitParam("cdm_expanded") ? "false" : "true";
var query = "?op=rpc&method=setpref&key=CDM_EXPANDED&value=" + value;
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
setInitParam("cdm_expanded", !getInitParam("cdm_expanded"));
viewCurrentFeed();
} });
};
} catch (e) {