We do not include any third-party scripts, advertising suites, Social Media tracking pixels, or any other form of technology to track you.
However, we aim to minimize server resource use and maximize scalability. To do this, we rely on your client – instead of our server – to build web pages for you.
Let's say you navigate to a card page – for example, to /card#4041.
Why make everything this complicated, you might rightfully ask – after all, you could just send a pre-generated complete "Dark Magician" page from the server.
Well, that's where our second trick kicks in. We cache files very aggressively on your client. The first time you access the Database, we install what's called a "Service Worker" script. Essentially, your browser allows this script to intercept any requests made to our own database servers, and decide if the request is even necessary at all. Quite often, we can simply avoid making it at all, because you've already seen the file you need.
This is why it's so important that we keep data compartmentalized. Instead of needing to transmit an entire file skeleton including the Dark Magician's card data, we can simply re-use the card page skeleton that's already cached, and only request the card-specific data. In fact, if you've already seen the Dark Magician anywhere on the database before – for example if it was mentioned in a Q&A entry, or it popped up as a result for an unrelated search – you already have all that data, and we don't need to request anything!
First-party scripts (unminified):
/cache-worker.js is our Service Worker.
This has to be in the root directory for scoping reasons – Service Workers can only handle requests to the directory they reside in, or its sub-directories.
/js/shared.js contains mainly utility functions or shared functionality.
Things like the handling of ruby text or locale switching go here.
/js/cache.js adds an additional layer of fast caching on top of the cross-page Service Worker cache.
If you end up needing the Dark Magician's data 30 times to render a Q&A search listing, the on-disk cache only needs to get hit once.
/js/session.js handles authentication for logged-in users. It is loaded for nearly every page, but will not have any function for you.
Found a security vulnerability? That's awkward! Please get in touch - we have a Discord server, or you can reach out to @gallantron#1059 directly.
/js/search_engine.js contains our search system.
They are used in a few places, most prominently – of course – on our search page. We use PEG.js to generate parts of this file.
/js/index.js, /js/card.js, /js/qa.js, /js/search.js, /js/recent.js and /js/settings.js are the main scripts for their respective pages.
They are only included on their respective pages, and provide those pages' primary functionality.
Dependencies (minified, unmodified):
/js/dep/idb-min.js is a minified copy of the IDB module.
Our Service Worker script includes this – it adds async support to IndexedDB, which we use to store cached data.
/js/dep/munkres-min.js is a minified copy of the Munkres.js library for solving LAP instances.
We use this when you search for a card name – matching the words in your search phrase to words in a card's name is a LAP instance!
Hopefully, this page has helped remedy any concerns you might've had about adding us to your NoScript whitelist.
Is there anything else you'd like to ask, first? Don't hesitate to get in touch. We have a Discord server you can use, or your can reach out to us on Reddit.