The page
This is the theme’s completeindex.html. It will not change for the rest of the
guide, so here it is in full:
- Leave the
<head>tag as it is, with no attributes. ejGames inserts the SDK (<script src="/_sdk/ejg.js">) right after<head>, before your scripts. If it cannot find the tag, it puts the script at the very start, ahead of the<!doctype>, and the page drops into quirks mode. type="module"on your script, so you can useimportandawaitoutside functions.data-ejg-dragturns the bar into the handle for dragging the window (double-click maximizes). Anything that should not drag, such as the buttons, getsdata-ejg-nodrag.#rejillawill hold the covers,#fichawill be the game page (step 6) and#pistasthe control bar (step 5). Thedata-focus…attributes are explained in step 5.
Buscar, Ajustes, and the ones in later steps) stay in Spanish. That text is the translation key. See Languages.
A little style
Startstyle.css with the base: colors in variables, the page fullscreen, and the top bar.
The first main.js
await window.ejg.ready()waits until ejGames has sent the data (library, profile, options). Always start this way.ejg.library.allis the list of games, already sorted by name. It is an in-memory copy: reading it costs nothing.ejg.library.onChange(fn)tells you when something changes: new games, a favorite, a cover that just finished downloading… Here we draw everything again. In the next step we will do it without rebuilding what did not change.
Game)
carries, among other things:
The full list is in the reference.

