mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 23:31:29 +00:00
code cleanups
This commit is contained in:
12
feedlist.js
12
feedlist.js
@@ -19,7 +19,7 @@ function viewfeed(feed, subop, is_cat, subop_param) {
|
|||||||
|
|
||||||
enableHotkeys();
|
enableHotkeys();
|
||||||
|
|
||||||
var toolbar_query = parent.Form.serialize("main_toolbar_form");
|
var toolbar_query = Form.serialize("main_toolbar_form");
|
||||||
var toolbar_form = document.forms["main_toolbar_form"];
|
var toolbar_form = document.forms["main_toolbar_form"];
|
||||||
|
|
||||||
if (document.forms["main_toolbar_form"].query) {
|
if (document.forms["main_toolbar_form"].query) {
|
||||||
@@ -35,10 +35,10 @@ function viewfeed(feed, subop, is_cat, subop_param) {
|
|||||||
var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
|
var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
|
||||||
toolbar_query + "&subop=" + param_escape(subop);
|
toolbar_query + "&subop=" + param_escape(subop);
|
||||||
|
|
||||||
if (parent.document.getElementById("search_form")) {
|
if (document.getElementById("search_form")) {
|
||||||
var search_query = parent.Form.serialize("search_form");
|
var search_query = Form.serialize("search_form");
|
||||||
query = query + "&" + search_query;
|
query = query + "&" + search_query;
|
||||||
parent.closeInfoBox(true);
|
closeInfoBox(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("IS_CAT_STORED: " + activeFeedIsCat() + ", IS_CAT: " + is_cat);
|
debug("IS_CAT_STORED: " + activeFeedIsCat() + ", IS_CAT: " + is_cat);
|
||||||
@@ -62,7 +62,7 @@ function viewfeed(feed, subop, is_cat, subop_param) {
|
|||||||
var next_unread_feed = getRelativeFeedId(feedlist,
|
var next_unread_feed = getRelativeFeedId(feedlist,
|
||||||
getActiveFeedId(), "next", true);
|
getActiveFeedId(), "next", true);
|
||||||
|
|
||||||
var show_next_feed = parent.getInitParam("on_catchup_show_next_feed") == "1";
|
var show_next_feed = getInitParam("on_catchup_show_next_feed") == "1";
|
||||||
|
|
||||||
if (next_unread_feed && show_next_feed && !activeFeedIsCat()) {
|
if (next_unread_feed && show_next_feed && !activeFeedIsCat()) {
|
||||||
query = query + "&nuf=" + param_escape(next_unread_feed);
|
query = query + "&nuf=" + param_escape(next_unread_feed);
|
||||||
@@ -74,8 +74,6 @@ function viewfeed(feed, subop, is_cat, subop_param) {
|
|||||||
query = query + "&cat=1";
|
query = query + "&cat=1";
|
||||||
}
|
}
|
||||||
|
|
||||||
var headlines_frame = parent.frames["headlines-frame"];
|
|
||||||
|
|
||||||
if (navigator.userAgent.match("Opera")) {
|
if (navigator.userAgent.match("Opera")) {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
var timestamp = Math.round(date.getTime() / 1000);
|
var timestamp = Math.round(date.getTime() / 1000);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ function notify_real(msg, doc, no_hide, is_err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function p_notify(msg, no_hide, is_err) {
|
function p_notify(msg, no_hide, is_err) {
|
||||||
notify_real(msg, parent.document, no_hide, is_err);
|
notify_real(msg, document, no_hide, is_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
function notify(msg, no_hide, is_err) {
|
function notify(msg, no_hide, is_err) {
|
||||||
@@ -246,7 +246,7 @@ function cleanSelectedList(element) {
|
|||||||
for (i = 0; i < content.childNodes.length; i++) {
|
for (i = 0; i < content.childNodes.length; i++) {
|
||||||
var child = content.childNodes[i];
|
var child = content.childNodes[i];
|
||||||
if (child.id == "feedCatHolder") {
|
if (child.id == "feedCatHolder") {
|
||||||
parent.debug(child.id);
|
debug(child.id);
|
||||||
var fcat = child.lastChild;
|
var fcat = child.lastChild;
|
||||||
for (j = 0; j < fcat.childNodes.length; j++) {
|
for (j = 0; j < fcat.childNodes.length; j++) {
|
||||||
var feed = fcat.childNodes[j];
|
var feed = fcat.childNodes[j];
|
||||||
@@ -539,10 +539,7 @@ function parse_counters(reply, scheduled_call) {
|
|||||||
if (feedctr && feedu && feedr) {
|
if (feedctr && feedu && feedr) {
|
||||||
|
|
||||||
if (feedu.innerHTML != ctr && id == getActiveFeedId() && scheduled_call) {
|
if (feedu.innerHTML != ctr && id == getActiveFeedId() && scheduled_call) {
|
||||||
// var hf = title_obj.parent.frames["headlines-frame"];
|
|
||||||
// hf.location.reload(true);
|
|
||||||
viewCurrentFeed();
|
viewCurrentFeed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
feedu.innerHTML = ctr;
|
feedu.innerHTML = ctr;
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ function labelFromSearch(search, search_mode, match_on, feed_id, is_cat) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
function headlines_init() {
|
function headlines_init() {
|
||||||
if (arguments.callee.done) return;
|
if (arguments.callee.done) return;
|
||||||
arguments.callee.done = true;
|
arguments.callee.done = true;
|
||||||
@@ -413,3 +413,4 @@ function headlines_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user