Merge pull request #1466 from mluto/timeslider-remove-debugging

Removed debug code from Timeslider
pull/1467/head
John McLear 2013-02-07 06:36:30 -08:00
commit ea04e9c997
1 changed files with 2 additions and 2 deletions

View File

@ -107,16 +107,16 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
{ {
newpos = Number(newpos); newpos = Number(newpos);
if (newpos < 0 || newpos > sliderLength) return; if (newpos < 0 || newpos > sliderLength) return;
window.location.hash = "#" + newpos;
if(!newpos){ if(!newpos){
newpos = 0; // stops it from displaying NaN if newpos isn't set newpos = 0; // stops it from displaying NaN if newpos isn't set
} }
window.location.hash = "#" + newpos;
$("#ui-slider-handle").css('left', newpos * ($("#ui-slider-bar").width() - 2) / (sliderLength * 1.0)); $("#ui-slider-handle").css('left', newpos * ($("#ui-slider-bar").width() - 2) / (sliderLength * 1.0));
$("a.tlink").map(function() $("a.tlink").map(function()
{ {
$(this).attr('href', $(this).attr('thref').replace("%revision%", newpos)); $(this).attr('href', $(this).attr('thref').replace("%revision%", newpos));
}); });
console.log(newpos);
$("#revision_label").html(html10n.get("timeslider.version", { "version": newpos})); $("#revision_label").html(html10n.get("timeslider.version", { "version": newpos}));
if (newpos == 0) if (newpos == 0)