path: root/lib/VNDB
diff options
authorYorhel <>2020-05-29 09:51:09 +0200
committerYorhel <>2020-05-29 09:51:11 +0200
commit3e2cacb826dc703b789d575c378f8dccb2dc95a6 (patch)
treef08801825809ae77ca847a016415f4a70fd714b4 /lib/VNDB
parent475b01dcf589d34ea1b4b8ce22f4302605b251f5 (diff)
JS: Split v2rw.js into plain.js and elm.js, only include JS files when necessary
The trace_log showed that the vast majority of pageviews do not need any Elm modules at all, so we can save a lot by not loading them on the page. Some pages (most notably: VN pages for not-logged-in visitors) do need JS but don't load any Elm modules. I've added a 'js' flag to HTML::framework_() to indicate that and ensure that plain.js is still loaded.
Diffstat (limited to 'lib/VNDB')
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/VNDB/Util/ b/lib/VNDB/Util/
index 6bafbeda..a18542f8 100644
--- a/lib/VNDB/Util/
+++ b/lib/VNDB/Util/
@@ -35,7 +35,6 @@ sub htmlFooter { # %options => { pref_code => 1 }
noscript id => 'pref_code', title => $self->authGetCode('/xml/prefs.xml'), ''
if $o{pref_code} && $self->authInfo->{id};
script type => 'text/javascript', src => $self->{url_static}.'/f/vndb.js?'.$self->{version}, '';
- VNWeb::HTML::v2rwjs_() if $o{v2rwjs};
end 'body';
end 'html';