diff --git a/pagetop-jquery/src/lib.rs b/pagetop-jquery/src/lib.rs index d3df0573..f9cbd26c 100644 --- a/pagetop-jquery/src/lib.rs +++ b/pagetop-jquery/src/lib.rs @@ -15,10 +15,6 @@ impl ModuleTrait for JQuery { MODULE_JQUERY } - fn actions(&self) -> Vec { - vec![action!(ActionBeforeRenderPage => before_render_page)] - } - fn name(&self) -> L10n { L10n::t("module_name", &LOCALE_JQUERY) } @@ -27,6 +23,10 @@ impl ModuleTrait for JQuery { L10n::t("module_description", &LOCALE_JQUERY) } + fn actions(&self) -> Vec { + vec![action!(ActionBeforeRenderPage => before_render_page)] + } + fn configure_service(&self, cfg: &mut service::web::ServiceConfig) { serve_static_files!(cfg, "/jquery", jquery); } @@ -45,7 +45,7 @@ impl JQuery { fn before_render_page(page: &mut Page) { if let Some(true) = page.context().get_param::(JQUERY_PARAM) { page.context().alter(ContextOp::AddJavaScript( - JavaScript::located("/jquery/3.6.0/jquery.min.js") + JavaScript::located("/jquery/jquery.min.js?v=3.6.0") .with_weight(isize::MIN) .with_mode(ModeJS::Normal), )); diff --git a/pagetop-jquery/static/3.6.0/jquery.min.js b/pagetop-jquery/static/jquery.min.js similarity index 100% rename from pagetop-jquery/static/3.6.0/jquery.min.js rename to pagetop-jquery/static/jquery.min.js diff --git a/pagetop-jquery/static/3.6.0/jquery.min.map b/pagetop-jquery/static/jquery.min.map similarity index 100% rename from pagetop-jquery/static/3.6.0/jquery.min.map rename to pagetop-jquery/static/jquery.min.map