|
|
|
@ -2,6 +2,7 @@ var _infscroll_disable = 0;
|
|
|
|
|
var _infscroll_request_sent = 0;
|
|
|
|
|
var _search_query = false;
|
|
|
|
|
var _viewfeed_last = 0;
|
|
|
|
|
var _viewfeed_timeout = false;
|
|
|
|
|
|
|
|
|
|
var counters_last_request = 0;
|
|
|
|
|
|
|
|
|
@ -52,7 +53,7 @@ function loadMoreHeadlines() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
|
|
|
|
|
function viewfeed(feed, method, is_cat, offset, background, infscroll_req, can_wait) {
|
|
|
|
|
try {
|
|
|
|
|
if (is_cat == undefined)
|
|
|
|
|
is_cat = false;
|
|
|
|
@ -132,8 +133,16 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
|
|
|
|
|
|
|
|
|
|
console.log(query);
|
|
|
|
|
|
|
|
|
|
if (can_wait && _viewfeed_timeout) {
|
|
|
|
|
setFeedExpandoIcon(getActiveFeedId(), activeFeedIsCat(), 'images/blank_icon.gif');
|
|
|
|
|
clearTimeout(_viewfeed_timeout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setActiveFeedId(feed, is_cat);
|
|
|
|
|
|
|
|
|
|
timeout_ms = can_wait ? 250 : 0;
|
|
|
|
|
_viewfeed_timeout = setTimeout(function() {
|
|
|
|
|
|
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
|
parameters: query,
|
|
|
|
|
onComplete: function(transport) {
|
|
|
|
@ -141,6 +150,7 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
|
|
|
|
|
headlines_callback2(transport, offset, background, infscroll_req);
|
|
|
|
|
PluginHost.run(PluginHost.HOOK_FEED_LOADED, [feed, is_cat]);
|
|
|
|
|
} });
|
|
|
|
|
}, timeout_ms); // Wait 250ms
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
exception_error("viewfeed", e);
|
|
|
|
|