Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This has been mostly automated.
|
|
I definitely needed the Tie::IxHash thing for these.
|
|
This removes the reliance on sort() to provide meaningful ordering (the
keys aren't always good for ordering) and removes the 'order' hack used
for (vn|prod)_relations.
|
|
|
|
|
|
|
|
Compresses a little better. I reduced the number of iterations required
to find the optimal image size in spritegen.pl, but generating the
icons.png is *incredibly slow* when combining zopflipng with the 'slow'
option. It's possible to parallelize the calculation and use multiple
cores to speed it up, but that seems overkill.
Some icons.png compression stats:
METHOD SIZE RUNTIME
default 18103 <1sec
slow 17941 few secs
pngcrush 15385 <1sec
pngcrush+slow 15148 few mins
zopflipng 14986 few secs
zopflipng+slow 14898 ~1 hour
|
|
Tends to compress a bit better than JavaScript::Minifier::JS. But is
also a lot slower, so not really useful when devving.
Stats for en.js:
raw gzip
uglifyjs 68199 19446
JS::Minifier::XS 79862 21624
Uncompressed 107662 28663
On an unrelated note, I like how jQuery boasts about being "Only 32kB
minified and gzipped.". That's quite a bit more than all of VNDB's
Javascript combined. For a damn library.
|
|
This simplifies the JS code in some places and removes a whole number of
L10N strings from the "l10n_str" var, thus shrinking the JS size a bit
(uncompressed about 1500 bytes, in fact. 500 bytes after gzip).
|
|
This simplifies the JS version of mt() a bit and makes the whole
internationalization framework a bit more robust. I also changed the
VARS.{rlist_status,age_ratings,languages,platforms,char_roles} arrays to
include the L10N string. This simplifies the JS code and reduces the JS
size. There's a few more of such lists that can be transformed in the
same way, I'll get to that later.
|
|
This removes the need to indent all files and add the anonymous function
manually, and it also provides clean and consistent semantics.
I already rewrote the library-like files earlier on to add their public
interfaces to the window object, so everything should keep working after
this change. It's still possible that some files use use a function from
another non-library file. Those will break, but I'm sure such cases will
be found soon enough, if they exist.
|
|
This removes one source of namespace polution, and makes it more clear
which code is using the variables.
|
|
First part of a Javascript cleanup.
|
|
|
|
|
|
|
|
|
|
Still somewhat quircky, but it works.
|
|
|
|
There may still be some bugs present and I've only converted the points
where TUWF is incompatible with YAWF. The new TUWF features are not in
use yet, I'll do that later on.
Note that, in order to run the new code, TUWF must be installed on your
system. The configuration for the TransAdmin plugin has also changed.
Other than that there shouldn't be any issues.
|
|
|
|
Should've tested an earlier commit. jsgen.pl wouldn't even run. >_>
|
|
This can be seen as a partial revert of
0a4f97f0186d6941a4cab2e3bd05201f1fed1441.
I used to think using NULL for special values is more "correct" in
database terms. But in the end I guess I should be aiming for whatever
solution is easier. Both are "correct" in a sense anyway.
|
|
A somewhat ugly approach, but couldn't think of something better.
|
|
This is how it used to be before the JS files were split. I simply
forgot to update this code to behave the same.
|
|
Has been requested quite often, now finally implemented.
|
|
The release filters are now pretty much complete. Save, perhaps, for
some improved styling and grouping in the filter selector; but I'm too
lazy for that at the moment.
|
|
Surprisingly enough, the SQL queries are still quite fast even when
matching on the animation columns.
And thanks to the new filter system, adding this filter was incredibly
easy.
|
|
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 jsgen.pl 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!
|
|
This isn't entirely functional yet, the server side will need to be
rewritten as well. And after that new filters should be added and this
system should also be used for VN/producer search.
script.js is getting quite large with all those new translation strings,
it may be an idea to generate a separate .js file for each language and
only load the one being used.
I won't have a valid reason to feel bored anytime soon, at least...
|
|
This makes jsgen.pl a bit easier to maintain, as there's not one
reliable source to get the keys from (namely, the JS code itself).
Also cleaned up the l10n() function in jsgen.pl to be more readable.
I had expected the new .js file to be smaller because this trick may
remove some keys that were previously present but unused. Unfortunately
it seems the file only grew a bit larger and compression seems to be
less effective now. No idea why this happened. :-(
|
|
This replaces the "cookie_auth" setting, and applies to all cookies in
use by VNDB.
|
|
Again, mostly copied from the VN relation editor...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Should be converted to enums at some point... integers don't do the
trick here.
|
|
|
|
|
|
While this 'processing' is currently limited to minifying the file if
JavaScript::Minifier::XS is available, this change would make it a lot
easier to make the strings in the JS code translatable.
|