Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration option to disable spinner #9

Merged
merged 1 commit into from
Aug 21, 2013
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
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ You can adjust the `trickleRate` (how much to increase per trickle) and
NProgress.configure({ trickleRate: 0.02, trickleSpeed: 800 });
~~~

Want to turn off loading spinner? Set `showSpinner` to `false`.

~~~ js
NProgress.configure({ showSpinner: false });
~~~

Customization
-------------

Expand Down
3 changes: 3 additions & 0 deletions nprogress.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
trickle: true,
trickleRate: 0.02,
trickleSpeed: 800,
showSpinner: true,
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner"><div class="spinner-icon"></div></div>'
};

Expand Down Expand Up @@ -177,6 +178,8 @@
transform: 'translate3d('+perc+'%,0,0)'
});

if(!Settings.showSpinner) $el.find('.spinner').hide();

$el.appendTo(document.body);

return $el;
Expand Down