/* subscribe to game save/load events */
Config.saves.onLoad = App.EventHandlers.onLoad;
Config.saves.onSave = App.EventHandlers.onSave;

$(document).on(':storyready', function() {
	App.EventHandlers.storyReady();
});

$(document).one(':passagestart', function() {
	App.EventHandlers.optionsChanged();
});

$(document).on(':passagestart', function() {
	Object.defineProperty(State.temporary, "S", {
		get: () => S
	});
});

$(document).on("passageinit", () => {
	if (V.passageSwitchHandler) {
		V.passageSwitchHandler();
		delete V.passageSwitchHandler;
	}
});

src/zz1-last/setupEventHandlers.js