Improve pages.home preloading when loading pages.quiz

This commit is contained in:
Niko 2022-02-25 15:34:44 +01:00
parent 2d501f7575
commit e99f1bd636
2 changed files with 8 additions and 0 deletions

View File

@ -460,6 +460,13 @@ function scriptPageHandler(modname, cfg) {
}
app.preload = {
home: function() {
app.script('pages.home');
app.template.loadMany([
'home.index',
'home.quiz_item',
]);
},
quiz: function() {
app.script('pages.quiz');
app.template.loadMany([

View File

@ -25,6 +25,7 @@ app.pages.quiz = {
window.prevHash === '')
animateTimeout('#quiz', 'slide-from-right');
page().setDragEvent();
app.preload.home();
};
if (data === undefined)
http.get(`/api/v1/me/quizs?id=${args[1]}`,