optimize ajaxify

- do not call $.timeago twice on topic load and for widgets
- do not use toLocaleString for each timeago string, use a single
Intl.DateTimeFormat instance instead
- do not call format for empty timeago strings, ie a post that isnt
edited doesnt have a timeago string
- do not call isTouchDevice for every element
- remove app.replaceSelfLinks, this is superceded with /me route
- store references to jquery objects in navigator instead of creating
them on every scroll
This commit is contained in:
Baris Usakli
2018-11-17 14:07:48 -05:00
parent 6ade156ba5
commit c343b93a37
9 changed files with 88 additions and 102 deletions

View File

@@ -45,7 +45,7 @@ define('forum/topic', [
app.enterRoom('topic_' + tid);
posts.processPage(components.get('post'));
posts.onTopicPageLoad(components.get('post'));
postTools.init(tid);
threadTools.init(tid);