Show More
@@ -28,6 +28,8 b" var CLASS_POST = '.post'" | |||
|
28 | 28 | var POST_ADDED = 0; |
|
29 | 29 | var POST_UPDATED = 1; |
|
30 | 30 | |
|
31 | var JS_AUTOUPDATE_PERIOD = 20000; | |
|
32 | ||
|
31 | 33 | var wsUser = ''; |
|
32 | 34 | |
|
33 | 35 | var unreadPosts = 0; |
@@ -193,9 +195,18 b' function isPageBottom() {' | |||
|
193 | 195 | return scroll == 1 |
|
194 | 196 | } |
|
195 | 197 | |
|
198 | function enableJsUpdate() { | |
|
199 | setInterval(getThreadDiff, JS_AUTOUPDATE_PERIOD); | |
|
200 | return true; | |
|
201 | } | |
|
202 | ||
|
196 | 203 | function initAutoupdate() { |
|
204 | if (location.protocol === 'https:') { | |
|
205 | return enableJsUpdate(); | |
|
206 | } else { | |
|
197 | 207 | return connectWebsocket(); |
|
198 | 208 | } |
|
209 | } | |
|
199 | 210 | |
|
200 | 211 | function getReplyCount() { |
|
201 | 212 | return $('.thread').children(CLASS_POST).length |
General Comments 0
You need to be logged in to leave comments.
Login now