summaryrefslogtreecommitdiff
path: root/src/static/js/broadcast_slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js/broadcast_slider.js')
-rw-r--r--src/static/js/broadcast_slider.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js
index 221666de..08ac08b5 100644
--- a/src/static/js/broadcast_slider.js
+++ b/src/static/js/broadcast_slider.js
@@ -107,6 +107,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
{
newpos = Number(newpos);
if (newpos < 0 || newpos > sliderLength) return;
+ window.location.hash = "#" + newpos;
$("#ui-slider-handle").css('left', newpos * ($("#ui-slider-bar").width() - 2) / (sliderLength * 1.0));
$("a.tlink").map(function()
{
@@ -481,6 +482,18 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
}
$("#timeslider").show();
+
+ var startPos = clientVars.collab_client_vars.rev;
+ if(window.location.hash.length > 1)
+ {
+ var hashRev = Number(window.location.hash.substr(1));
+ if(!isNaN(hashRev))
+ {
+ // this is necessary because of the socket.io-event which loads the changesets
+ setTimeout(function() { setSliderPosition(hashRev); }, 1);
+ }
+ }
+
setSliderLength(clientVars.collab_client_vars.rev);
setSliderPosition(clientVars.collab_client_vars.rev);