mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 01:05:56 +00:00
new hotkey =: toggle hide read headlines
This commit is contained in:
41
viewfeed.js
41
viewfeed.js
@@ -21,6 +21,7 @@ var vgroup_last_feed = false;
|
||||
var post_under_pointer = false;
|
||||
|
||||
var last_requested_article = false;
|
||||
var read_headlines_visible = true;
|
||||
|
||||
function catchup_callback() {
|
||||
if (xmlhttp_rpc.readyState == 4) {
|
||||
@@ -1792,6 +1793,46 @@ function subtoolbarSearch() {
|
||||
}
|
||||
}
|
||||
|
||||
function hideReadHeadlines() {
|
||||
try {
|
||||
|
||||
var ids = false;
|
||||
var vis_ids = new Array();
|
||||
|
||||
if (document.getElementById("headlinesList")) {
|
||||
ids = getVisibleHeadlineIds();
|
||||
} else {
|
||||
ids = cdmGetVisibleArticles();
|
||||
}
|
||||
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var row = document.getElementById("RROW-" + ids[i]);
|
||||
|
||||
if (row && row.className) {
|
||||
if (read_headlines_visible) {
|
||||
if (row.className.match("Unread") || row.className.match("Selected")) {
|
||||
Element.show(row);
|
||||
vis_ids.push(ids[i]);
|
||||
} else {
|
||||
//Effect.Fade(row, {duration : 0.3});
|
||||
Element.hide(row);
|
||||
}
|
||||
} else {
|
||||
Element.show(row);
|
||||
vis_ids.push(ids[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixHeadlinesOrder(vis_ids);
|
||||
|
||||
read_headlines_visible = !read_headlines_visible;
|
||||
|
||||
} catch (e) {
|
||||
exception_error("hideReadHeadlines", e);
|
||||
}
|
||||
}
|
||||
|
||||
function getArticleUnderPointer() {
|
||||
return post_under_pointer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user