Skip to content

Commit 52032d0

Browse files
committed
Remove backbone tracking, as it shouldn't be required if pushState tracking is on
1 parent 5506ff4 commit 52032d0

3 files changed

Lines changed: 2 additions & 65 deletions

File tree

pace.coffee

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ defaultOptions =
3131
# means ajax navigation has occured)
3232
restartOnPushState: true
3333

34-
# Should pace automatically restart when a Backbone route change occurs? Can also be an
35-
# array of route names. Ignored if Backbone.js is not included on the page.
36-
restartOnBackboneRoute: true
37-
3834
# Should we show the progress bar for every ajax request (not just regular or ajax-y page
3935
# navigation)? Set to false to disable.
4036
#
@@ -507,30 +503,6 @@ if window.history.replaceState?
507503

508504
_replaceState.apply window.history, arguments
509505

510-
firstLoad = true
511-
if options.restartOnBackboneRoute
512-
# Bind in a timeout, as it's possible Backbone hasen't been
513-
# included yet
514-
setTimeout ->
515-
return unless window.Backbone?
516-
517-
Backbone.history.on 'route', (router, name) ->
518-
return unless rule = options.restartOnBackboneRoute
519-
520-
if firstLoad
521-
# We don't want to do anything on the initial route
522-
firstLoad = false
523-
return
524-
525-
if typeof rule is 'object'
526-
# It's an array of route names
527-
for routeName in rule when routeName is name
528-
Pace.restart()
529-
break
530-
else
531-
Pace.restart()
532-
, 0
533-
534506
SOURCE_KEYS =
535507
ajax: AjaxMonitor
536508
elements: ElementMonitor

pace.js

Lines changed: 1 addition & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)