path: root/lib
diff options
authorYorhel <>2010-11-25 17:22:58 +0100
committerYorhel <>2010-11-25 17:38:16 +0100
commit625871cba8a2fe71c70b3d2946a5f37993d1f263 (patch)
tree1288db3b6ea43467251a6039a26e861326f0babe /lib
parent7004c8352cda3c81e547aabc037fd9ec7f03172c (diff)
JS: Split script.js into a separate file for each language
This greatly reduces the size of the Javascript file. The compressed size has been reduced with about 9kB, and is now a total of 14kB for en.js. A nice property of this is that more translations can be added without increasing the JS size. While I was at it, I made also replace mt() function calls in cases where an exact TL string was requested without any additional arguments and/or formatting codes. This helped reduce the compressed size by about 1kB. My aim is to keep *all* the JS code of VNDB smaller than the jQuery core library, as a general "fuck you" towards users of large and bloated JS libraries. We must keep the VNDB page loading times lower than that of other sites, after all!
Diffstat (limited to 'lib')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Util/ b/lib/VNDB/Util/
index 8b2f9ef1..b5dc3e9c 100644
--- a/lib/VNDB/Util/
+++ b/lib/VNDB/Util/
@@ -155,7 +155,7 @@ sub htmlFooter {
a href => $self->{source_url}, mt '_footer_source';
end; # /div maincontent
- script type => 'text/javascript', src => $self->{url_static}.'/f/script.js?'.$self->{version}, '';
+ script type => 'text/javascript', src => $self->{url_static}.'/f/js/'.$self->{l10n}->language_tag().'.js?'.$self->{version}, '';
end; # /body
end; # /html