Skip to content
Snippets Groups Projects
Commit fbdcd2de authored by echicken's avatar echicken :chicken:
Browse files

Use new simpler unread fetcher thingies. Should resolve 502 error reported by ragnarok.

parent 59077fbf
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -12,8 +12,8 @@ var strings = { ...@@ -12,8 +12,8 @@ var strings = {
vote_functions : 'enableVoteButtonHandlers("%s");', vote_functions : 'enableVoteButtonHandlers("%s");',
vote_refresh_thread : 'getVotesInThread("%s", %s)', vote_refresh_thread : 'getVotesInThread("%s", %s)',
vote_refresh_threads : 'getVotesInThreads("%s")', vote_refresh_threads : 'getVotesInThreads("%s")',
get_group_unread : 'getGroupUnreadCount("%s")', get_group_unread : 'getGroupUnreadCounts()',
get_sub_unread : 'getSubUnreadCount("%s")', get_sub_unread : 'getSubUnreadCounts("%s")',
poll_control : 'pollControl("%s", %s)', poll_control : 'pollControl("%s", %s)',
get_poll_data : 'getPollData("%s", %s)', get_poll_data : 'getPollData("%s", %s)',
close : '</script>' close : '</script>'
...@@ -631,14 +631,11 @@ if (typeof http_request.query.sub !== 'undefined' && ...@@ -631,14 +631,11 @@ if (typeof http_request.query.sub !== 'undefined' &&
function writeApiCall(subs) { function writeApiCall(subs) {
writeln(strings.script.open); writeln(strings.script.open);
var codes = []; writeln(format(strings.script.get_sub_unread, http_request.query.group[0]));
subs.forEach(function (sub) { codes.push(sub.code); });
codes = codes.join('&sub=');
writeln(format(strings.script.get_sub_unread, codes));
writeln( writeln(
format( format(
strings.script.interval, strings.script.interval,
format(strings.script.get_sub_unread, codes), format(strings.script.get_sub_unread, http_request.query.group[0]),
settings.refresh_interval || 60000 settings.refresh_interval || 60000
) )
); );
...@@ -685,14 +682,11 @@ if (typeof http_request.query.sub !== 'undefined' && ...@@ -685,14 +682,11 @@ if (typeof http_request.query.sub !== 'undefined' &&
function writeApiCall(groups) { function writeApiCall(groups) {
writeln(strings.script.open); writeln(strings.script.open);
var indexes = []; writeln(strings.script.get_group_unread);
groups.forEach(function(group) { indexes.push(group.index); });
indexes = indexes.join('&group=');
writeln(format(strings.script.get_group_unread, indexes));
writeln( writeln(
format( format(
strings.script.interval, strings.script.interval,
format(strings.script.get_group_unread, indexes), strings.script.get_group_unread,
settings.refresh_interval || 60000 settings.refresh_interval || 60000
) )
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment