mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-16 16:57:14 +01:00
22 lines
376 B
JavaScript
22 lines
376 B
JavaScript
|
const NProgress = require('nprogress');
|
||
|
NProgress.configure({
|
||
|
trickleSpeed: 500,
|
||
|
showSpinner: false
|
||
|
});
|
||
|
|
||
|
const root = document.getElementsByTagName('html')[0];
|
||
|
|
||
|
module.exports = {
|
||
|
start: () => {
|
||
|
root.classList.add('progress');
|
||
|
NProgress.start();
|
||
|
},
|
||
|
done: () => {
|
||
|
root.classList.remove('progress');
|
||
|
NProgress.done();
|
||
|
},
|
||
|
set: val => {
|
||
|
NProgress.set(val);
|
||
|
}
|
||
|
};
|