Age | Commit message (Collapse) | Author | Files | Lines |
|
https://vndb.org/t950.521
|
|
Broken in 0687115f99
Fixes https://vndb.org/t2520.277
The JS check is based on
https://makandracards.com/makandra/1339-check-whether-an-element-is-visible-or-hidden-with-javascript
|
|
(cherry picked from commit 6446d7d185543440b97be009fdf2a1f0c379b26f)
|
|
|
|
|
|
https://vndb.org/t11296
|
|
As discussed in https://vndb.org/t10665
|
|
|
|
|
|
The backend does this validation as well, but if that validation fails
it will show an unhelpful "Malformed JSON" error. This JS message should
be more helpful.
|
|
I changed the exact matching syntax of the tag search to be '='-prefixed
rather than 'name:'-prefixed, to be similar to exact staff search. But I
forgot that the JS code relied on the name-prefix.
|
|
- Exact match is now case-insensitive
- Main staff search supports exact match with =-prefix
- On VN edit dropdown: exact matches are sorted before other matches
- VN edit dropdown now also displays original name
|
|
|
|
It's rather annoying to have to click "more" only to see one or two more
lines. Let's just show everything in that case.
|
|
|
|
This has been mostly automated.
|
|
I definitely needed the Tie::IxHash thing for these.
|
|
TODO: Intern strings again to simplify the code.
The immediate effect of this commit is that starting the util/vndb.pl
script and generating the JS file is much faster now and that vndb.pl
uses less memory. Translations have already been disabled on the main
VNDB for a week now.
|
|
|
|
Apparently IE doesn't like it when you put a HTMLCollection object
inside a DOM value.
|
|
|
|
|
|
- Merged polls table into threads table. Not much of a
storage/performance difference, and it's a bit simpler this way.
- Merged DB::Polls into DB::Discussions. Mainly because of the above
change in DB structure.
- Add option to remove an existing poll.
- Allow preview and recast to be changed without deleting the votes
- Set preview option by default. Because personal preferences. :)
- Minor form validation differences
|
|
|
|
|
|
|
|
|
|
Instead of the JS hack.
|
|
https://vndb.org/t950.103
|
|
The possible values of the rel attribute is fixed, it's not supposed to
be a free-form field.
|
|
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers
won't allow you to use modern Javascript APIs with an older doctype.
Note that most pages don't actually validate correctly as HTML5, I'm
relying on browsers to be lenient.
In either case, I'd like VNDB to stay valid XML (XHTML5, then), and
luckily that shouldn't be a problem.
|
|
|
|
|
|
|
|
This might have broken the screenshot uploader on some crappy browsers,
but it's much cleaner than the old iframe hack. The ability to upload
multiple files in one go is also very convenient.
|
|
This caused every [_#] to be replaced multiple times.
|
|
To fix the cast editor.
|
|
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.
|
|
- Individual blocks don't leak variables into the parent scope anymore.
Previously some blocks would re-use variables from other blocks,
creating (almost invisible) dependencies between te blocks.
- More consistent code for ulist-change-dropdowns, and all of them have
a ref= argument now.
- Use 'hidden' class instead of style.display wherever that makes sense.
- Remove dead 'advselect' code. Hasn't been used since the addition of
search filters.
- lang_select doesn't rely on the position of the language class in
className anymore (seriously that stuff is fragile...)
|
|
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).
|
|
charops.js was already recently (re)written and followed much of the new
conventions, so that was easy.
tagops.js has been simplified somewhat, and does not rely on the
position of the "tagspl#" class anymore.
|
|
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.
|
|
Same as usual. Some additional changes
- Removed parfunc argument to dsInit(), not used anywhere.
- The ds_box div is only created when used.
|
|
dropdown.js has also been improved a bit to only add the dd_box node to
the DOM when it's actually going to be used, and it now only captures
document.onmousemove when a box is shown.
|
|
|
|
|
|
|
|
This removes one source of namespace polution, and makes it more clear
which code is using the variables.
|
|
First part of a Javascript cleanup.
|