Skip to content
livrasand edited this page Nov 28, 2026 · 1 revision

Startup Scripts

Updainium can run a small JavaScript file each time it starts. The file is called init.js, and it lives in Updainium's configuration folder. Use it for setup code that should run on every launch.

Where init.js lives

The file is stored in the configuration folder. For example, on macOS it is ~/Library/Application Support/com.livrasand.updainium/init.js. See Configuration Reference for the folder on Windows and Linux.

To create or edit it, open the Command Palette and run Open init.js. If the file does not exist, Updainium creates an empty one and opens it in your default text editor.

What it can do

The script runs inside the app's WebView, with access to standard browser APIs. A minimal example:

console.log("Updainium custom init script loaded");

Scripts run after the app starts, using the same permissions as the app's interface. They cannot change the Rust backend, and they cannot read GitHub tokens, which stay in the operating system's credential store.

Behavior to know about

  • An empty file, or one that contains only whitespace, is skipped.
  • Updainium runs the file's code when the app starts. Changes take effect on the next launch.
  • Updainium does not display errors from init.js. A script that throws an exception stops at that point, and nothing is shown. Keep scripts small and test them carefully.

Safety

init.js is trusted code. It is not sandboxed and has the same access as the app's interface. Only use scripts you have written or reviewed yourself.

Clone this wiki locally