mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-16 06:57:36 -07:00
e24ca1e51f
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
21 lines
374 B
TypeScript
21 lines
374 B
TypeScript
import * as NProgress from 'nprogress';
|
|
NProgress.configure({
|
|
trickleSpeed: 500,
|
|
showSpinner: false
|
|
});
|
|
|
|
const root = document.getElementsByTagName('html')[0];
|
|
|
|
export default {
|
|
start: () => {
|
|
root.classList.add('progress');
|
|
NProgress.start();
|
|
},
|
|
done: () => {
|
|
root.classList.remove('progress');
|
|
NProgress.done();
|
|
},
|
|
set: val => {
|
|
NProgress.set(val);
|
|
}
|
|
};
|