@@ -14,16 +14,14 @@ Configuration
1414Pace is fully automatic, no configuration is necessary. If you do need to make some tweaks, here's
1515how:
1616
17- You can set ` Pace.options ` before bringing in the file:
17+ You can set ` window.paceOptions ` before bringing in the file:
1818
1919``` javascript
20- Pace = {
21- options: {
22- // Disable the 'elements' source
23- elements: false ,
20+ paceOptions = {
21+ // Disable the 'elements' source
22+ elements: false ,
2423
25- theme: ' barber-shop'
26- }
24+ theme: ' barber-shop'
2725}
2826```
2927
@@ -80,19 +78,17 @@ Pace includes four default collectors:
8078They can each be configured or disabled through configuration options of the same name.
8179
8280``` javascript
83- Pace = {
84- options: {
85- ajax: false , // disabled
86- document : false , // disabled
87- eventLag: false , // disabled
88- elements: {
89- sources: [' .my-page' ]
90- }
81+ paceOptions = {
82+ ajax: false , // disabled
83+ document : false , // disabled
84+ eventLag: false , // disabled
85+ elements: {
86+ sources: [' .my-page' ]
9187 }
92- }
88+ };
9389```
9490
95- Add your own instances to ` options .extraSources` to add more sources. Each source should either
91+ Add your own instances to ` paceOptions .extraSources` to add more sources. Each source should either
9692have a ` .progress ` property, or a ` .elements ` property which is a list of objects with
9793` .progress ` properties. Pace will automatically handle all scaling to make the progress
9894changes look smooth to the user.
@@ -104,10 +100,8 @@ Most users want the progress bar to automatically restart when a pushState event
104100(generally means ajax navigation is occuring). You can disable this:
105101
106102``` javascript
107- Pace = {
108- options: {
109- restartOnPushState: false
110- }
103+ paceOptions: {
104+ restartOnPushState: false
111105}
112106```
113107
0 commit comments