Commit Graph

430 Commits

Author SHA1 Message Date
Anton Grigoryev
342503e07a Feat: Client-side hooks - replace window.trigger (#9679)
* feat/clientside-hooks: replace window.trigger with hooks.fire

* feat(clientside-hooks): Move hooks require to the top

* fix: simplifying complex logical expression

* fix: client-side hook for translator - post-review fixes
2021-08-13 16:58:37 -04:00
Barış Soner Uşaklı
561ce7d30a fix: #9629, translate content property of meta tags 2021-06-23 11:03:59 -04:00
Julian Lam
db48b9527d fix: #9519 unable to properly ajaxify to home on subfolder installs if anchor did not have a trailing slash 2021-04-30 12:02:15 -04:00
Barış Soner Uşaklı
1af34b43e3 fix: #9474, load hooks on page load 2021-04-08 12:28:34 -04:00
Barış Soner Uşaklı
536591f842 fix: #9447, include query params in previousUrl 2021-03-30 20:10:14 -04:00
Julian Lam
d1685600d3 refactor: deprecate action:script.load, use filter:script.load instead 2021-03-15 13:56:12 -04:00
Julian Lam
d0136074b6 feat: allow hook unregistration, and temporary page-based hooks
Temporary hooks automatically unregister themselves on the next ajaxify, making them perfect for in-page events.
2021-02-23 15:18:00 -05:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
9f6a682ca9 chore: eslint no-script-url 2021-02-08 18:06:44 -05:00
Julian Lam
f8bf9e99c4 fix: pass module name to static:script.init, +comments
I feel it is difficult to know exactly what the original use-cases were for these hooks, so some comments may be helpful.
2021-01-28 16:15:04 -05:00
Barış Soner Uşaklı
05be1c6603 feat: restore action:script.load, allow modifying loaded module via static:script.init 2021-01-27 17:21:08 -05:00
Julian Lam
8b09292e77 chore: add deprecation notice in comments for ajaxify.loadExtraScripts 2021-01-27 16:10:19 -05:00
Julian Lam
7da1b43f2b fix: script failure if client-side page script does not exist 2021-01-27 14:32:15 -05:00
Julian Lam
faf5960373 fix: bug where action:ajaxify.end was never called if there were no init scripts 2021-01-27 12:23:02 -05:00
Julian Lam
8e5687a4af refactor(hooks): deprecate action:script.load client-side hook
Use `static:script.init` instead.
2021-01-27 12:23:02 -05:00
Julian Lam
1d77572117 feat(hooks): update action:ajaxify.end to use new hooks module 2021-01-27 12:23:02 -05:00
Julian Lam
e5edbc6faf feat: automatically attempt socket.io reconnection on ajaxify
Also, updated messaging and toaster to accurately reflect offline-mode state
2020-12-30 13:59:00 -05:00
Barış Soner Uşaklı
c1ecfd1ebf feat: #9135, don't try to reconnect forever 2020-12-28 11:44:14 -05:00
Barış Soner Uşaklı
5d00b0895b fix: sso redirect on /login & /api/login 2020-12-03 10:29:18 -05:00
Barış Soner Uşaklı
698718f87c feat: allow modifiying browser title on ajaxify 2020-12-02 20:46:57 -05:00
Barış Soner Uşaklı
73746bb489 refactor: remove old hack 2020-12-02 14:14:56 -05:00
Barış Soner Uşaklı
6f68f4d20a fix: #9032, fix login redirect for sso plugins 2020-12-02 12:42:21 -05:00
Barış Soner Uşaklı
5ceda14874 Revert "fix: #8955, popstate to purged topic should go to homepage"
This reverts commit 39dae0aaff.
2020-11-26 12:23:41 -05:00
Julian Lam
39dae0aaff fix: #8955, popstate to purged topic should go to homepage 2020-11-26 11:25:09 -05:00
Barış Soner Uşaklı
5fa098326f fix: https://github.com/NodeBB/NodeBB/pull/8685
fix category link redirect on cold load
fix helpers.redirect if passed in url is external
fix ajaxify so it doesn't slice first character of external url
2020-11-23 12:25:57 -05:00
Peter Jaszkowiak
e128264b66 refactor: change Benchpress.parse to .render (#8856)
It has been deprecated with no warning message for a while
Changing these over before enabling the warning message to reduce spam
2020-11-08 08:17:49 -05:00
Barış Soner Uşaklı
c107649b40 fix: #8732 2020-10-18 01:33:03 -04:00
Barış Soner Uşaklı
6669b23d9a feat: single href 2020-09-17 23:11:04 -04:00
Barış Soner Uşaklı
5002e0f62c feat: refactor app.js 2020-09-06 22:36:09 -04:00
Barış Soner Uşaklı
3cd3b7a172 feat: remove app.template 2020-09-06 22:07:39 -04:00
Barış Soner Uşaklı
630bac2aa5 feat: remove global window.templates 2020-09-06 21:55:31 -04:00
Barış Soner Uşaklı
94da9fe55e feat: add partials/footer/js.tpl
add ajaxify.coldLoad which gets called from partials/footer/js.tpl
2020-09-04 20:53:21 -04:00
Julian Lam
9adaccd036 feat: +assetBaseUrl, -l10BaseUrl, -requireBaseUrl
Additional base URLs were necessary for benchpress and translator,
and in order to not clutter the API response with needless one-
time use base URLs, I decided to use a single base that is used
by all of the services, assetBaseUrl.
2020-08-10 10:23:52 -04:00
Baris Usakli
9f78bd7a12 fix: sitemap ajaxify 2019-07-12 14:48:30 -04:00
Julian Lam
289dada5f7 fix(deps): update to eslint@6 2019-06-22 21:23:32 -04:00
Julian Lam
a97e97b9c3 fix: incorrect pathname format for app.previousUrl 2019-05-22 13:15:59 -04:00
Julian Lam
7e5cb72a59 fix: #7618 save pathname into app.previousUrl ins. of entire url 2019-05-17 17:47:36 -04:00
Julian Lam
a41769e61c feat: update meta tags on ajaxify (#7580), fixes #7544
* feat: wip -- refresh meta tags on ajaxify

* feat: wrapped up meta tags update on ajaxify feature

* fix: removed commented-out line

* fix: removed another commented-out line
2019-05-16 09:41:56 -04:00
Julian Lam
8aebe88417 fix: #7306 2019-01-28 16:07:42 -05:00
Baris Usakli
c343b93a37 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
2018-11-17 14:07:56 -05:00
Barış Soner Uşaklı
4293403451 #6535, use templateToRender clientside if its avaiable 2018-06-11 12:17:24 -04:00
Julian Lam
a3e724e134 resolve window opener being set if ajaxify overrides on external link 2018-06-03 22:00:02 -04:00
Barış Soner Uşaklı
d60d03d00f closes #6542 2018-06-02 15:56:23 -04:00
Barış Soner Uşaklı
d5e85c2eb3 closes #6476, closes #6546 2018-06-02 15:54:32 -04:00
Barış Soner Uşaklı
6940612688 closes #6410 2018-05-29 10:28:02 -04:00
Barış Soner Uşaklı
8ed86aaf13 closes #6476 2018-04-29 19:32:39 -04:00
Julian Lam
877b45ab00 adding old path to uploads as well, to ajaxify shirt-circuit 2018-04-20 10:35:54 -04:00
Julian Lam
bdbdf510e0 closes #6462 2018-04-19 14:24:01 -04:00
Barış Soner Uşaklı
802ec0e384 remove reduntant code 2017-12-14 11:27:18 -05:00
Barış Soner Uşaklı
76e8bcd80b closes #6167 2017-12-14 08:54:33 -05:00