UnderScript

Various changes to undercards, an undertale fan-made card game.

This project is maintained by feildmaster

Public API

by feildmaster (December 30, 2019)

Underscript exposes a public API via the variable underscript.

Methods

underscript.addStyle()

Add CSS to the document.

underscript.onPage()

Check if you’re on a page.

underscript.openPacks()

Opens packs and outputs the results (via toast).

underscript.plugin()

The Plugin API is a service made to allow elevated access to UnderScript’s internals.

underscript.streamerMode()

Detect if streamer mode is active.

Properties

underscript.version

The version of UnderScript being used.

Examples

// Open 10 DR packs
underscript.openPacks(10, 'DR');

// Log to console if streaming
if (underscript.streamerMode()) console.log('Streaming!');

// Log to console if on pack page
if (underscript.onPage('Packs')) console.log('On Pack page!');
// or
underscript.onPage('Packs', () => console.log('On Pack page!'));