From 4c7dac3fa409f56f8bbfb62c85108763b47fd5f1 Mon Sep 17 00:00:00 2001 From: Rahul Chanila Date: Wed, 21 Aug 2013 16:38:42 +0530 Subject: [PATCH] Add configuration option to disable spinner --- Readme.md | 6 ++++++ nprogress.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Readme.md b/Readme.md index 9c9b88a..9936c3f 100644 --- a/Readme.md +++ b/Readme.md @@ -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 ------------- diff --git a/nprogress.js b/nprogress.js index f966a7b..128506d 100644 --- a/nprogress.js +++ b/nprogress.js @@ -22,6 +22,7 @@ trickle: true, trickleRate: 0.02, trickleSpeed: 800, + showSpinner: true, template: '
' }; @@ -177,6 +178,8 @@ transform: 'translate3d('+perc+'%,0,0)' }); + if(!Settings.showSpinner) $el.find('.spinner').hide(); + $el.appendTo(document.body); return $el;