Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/api/hooks_client-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ Called from: src/static/js/timeslider.js

There doesn't appear to be any example available of this particular hook being used, but it gets fired after the timeslider is all set up.

## goToRevisionEvent
Called from: src/static/js/broadcast.js

Things in context:

1. rev - The newRevision

This hook gets fired both on timeslider load (as timeslider shows a new revision) and when the new revision is showed to a user.
There doesn't appear to be any example available of this particular hook being used.

## userJoinOrUpdate
Called from: src/static/js/pad_userlist.js

Expand Down
5 changes: 5 additions & 0 deletions src/static/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
var self = this;
var path = revisionInfo.getPath(padContents.currentRevision, newRevision);
debugLog('newRev: ', padContents.currentRevision, path);

hooks.aCallAll('goToRevisionEvent', {
rev: newRevision
});

if (path.status == 'complete')
{
var cs = path.changesets;
Expand Down