##// END OF EJS Templates
If we are over https, use old plain periodic thread update instead of...
neko259 -
r1146:3a63bd27 default
parent child Browse files
Show More
@@ -28,6 +28,8 b" var CLASS_POST = '.post'"
28 var POST_ADDED = 0;
28 var POST_ADDED = 0;
29 var POST_UPDATED = 1;
29 var POST_UPDATED = 1;
30
30
31 var JS_AUTOUPDATE_PERIOD = 20000;
32
31 var wsUser = '';
33 var wsUser = '';
32
34
33 var unreadPosts = 0;
35 var unreadPosts = 0;
@@ -193,9 +195,18 b' function isPageBottom() {'
193 return scroll == 1
195 return scroll == 1
194 }
196 }
195
197
198 function enableJsUpdate() {
199 setInterval(getThreadDiff, JS_AUTOUPDATE_PERIOD);
200 return true;
201 }
202
196 function initAutoupdate() {
203 function initAutoupdate() {
204 if (location.protocol === 'https:') {
205 return enableJsUpdate();
206 } else {
197 return connectWebsocket();
207 return connectWebsocket();
198 }
208 }
209 }
199
210
200 function getReplyCount() {
211 function getReplyCount() {
201 return $('.thread').children(CLASS_POST).length
212 return $('.thread').children(CLASS_POST).length
General Comments 0
You need to be logged in to leave comments. Login now