Age | Commit message (Collapse) | Author | Files | Lines |
|
Yay!
There are no more request handlers in the VNDB::* namespace and no more
Javascript in data/js/. This cleans up a lot of old legacy code that
wasn't fun to maintain.
|
|
Had been planning to use a more powerful preprocessor for CSS for a
while, so that I can also reorganize and clean up the CSS a bit. The
cleanup will come later, this is the first step to reorganize the build
system a bit and remove skingen.pl.
I moved all generated static assets to static/g/ (for _g_enerated),
including icons.png and js files. This simplifies management of
static/f/ and static/s/, which are fully in git.
Skins are now defined as sass files in css/skins/ with their images in
static/s/ using plain directory structure.
|
|
Turns out I forgot something in 3fc190f1898342d63b1308a83152fe45a88f7c3f
|
|
|
|
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.
|
|
Minimal version. It reuses the LabelEdit and VoteEdit widgets, but
doesn't allow setting a note or start/finish date at the moment.
VN pages now have both v2rw.js and the old vndb.js; Those two scripts
aren't meant to be used together on a single page, so I'm hoping this
will be temporary. I removed the 'checkall' handling from vndb.js as
that might conflict. It's only used on the old list pages anyway.
|
|
|
|
I copied and modified VN3::DB to VNWeb::DB, but it isn't used yet. Now
that I think about it, that module isn't "web" specific at all and
should perhaps be in the VNDB:: namespace. Oh well.
|
|
Present them in the same order as the main menu.
Remove user and forum stats, they're pretty much irrelevant. The user
count, in particular, is misleading - those aren't "active" users.
|
|
This gets rid of global.pl, config.pl and config3.pl and uses the
cleaner config3.pl format for the config file. The config is easily
accessible from anywhere by importing the new VNDB::Config module; The
global $VNDB::S,O,M,ROOT variables have been removed.
Sorry for all the churn...
|
|
|
|
|
|
|
|
|
|
With some related edits in other parts of the code, mostly due to
interface changes to htmlRevision() and htmlFormError().
Trivial replacements were automated by a super awesome script.
|
|
This has been mostly automated.
|
|
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.
|
|
|
|
Instead of the JS hack.
|
|
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 also simplifies the code a bit, as the value of the preference data
was never used so doesn't need to be included now. Primary reason for
this change is to work towards disabling inline JS with a CSP header.
There's still more stuff to fix before the CSP header can be applied,
though.
|
|
TUWF properly detects HTTPS and includes this in the returned URL, so
this change ensures that all URLs adopt properly to HTTP and HTTPS.
|
|
|
|
formcode is strengthened by including the IP (-prefix) into the hash,
ensuring that the code can't be obtained by someone on a different
network.
I also removed the login form of every page. Felt kinda pointless.
|
|
|
|
|
|
This is far more flexible.
|
|
|
|
|
|
|
|
|
|
Cleaner this way.
Also found two occurences of manually HTML-escaping text for textareas,
which isn't necessary anymore.
|
|
Haven't found any bugs this way, yet. I doubt there'll be any problems,
but it's a nice new feature that could help quite a bit. :-D
|
|
|
|
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.
|
|
- Added a 'prefs' option to htmlFooter() to add preference data for use by
Javascript.
- Added an /xml/prefs.xml URL for setting preferences from JS.
- Added 'filter_*' keys to the prefs_key ENUM
- Load filters by default on VN and Release browser
|
|
Will convert the other preferences later.
|
|
|
|
The new tag link browser has replaced the crappy old user-tags-browser.
|
|
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!
|
|
|
|
Also fixes a cross-site request forgery vulnerability. Not as strong as
the others but it's not very crucial anyway.
|
|
Conflicts:
data/lang.txt
|
|
|