diff options
author | Yorhel <git@yorhel.nl> | 2020-05-29 09:51:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-05-29 09:51:11 +0200 |
commit | 3e2cacb826dc703b789d575c378f8dccb2dc95a6 (patch) | |
tree | f08801825809ae77ca847a016415f4a70fd714b4 /lib/VNDB | |
parent | 475b01dcf589d34ea1b4b8ce22f4302605b251f5 (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')
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 6bafbeda..a18542f8 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -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'; } |