/twitch-subathon-countdown

This is an improved countdown timer for Twitch streams

Primary LanguageJavaScript

Improved Twitch Subathon Countdown

This is a Twitch Subathon Countdown originally by JayexDesigns.

The CSS Code is updated by Johnnycyan. The JS Files are updated by leabdd to add functionalities.


Description

A subathon timer that increases when someone subscribes, donates money, donates bits or purchases streamloots chests.

Added is a Timer that gets saved (in localStorage) and can be reset.

When you open the index.html you get to chose between "Reset" or "Start".


Shortcuts

To pause the Timer: CTRL+ALT+P

To enable/disable Happy Hour: CTRL+ALT+H

Shortcuts can be changed in config.js


Preview


Usage

After cloning this repository you'll have to edit the "config.js" file with any plain text editor, then change the value of the variables according to what you want:

Twitch

To get your Subs and Bits you just have to add your Channel Name.

Streamlabs Token

To get the token you'll have to go to the API settings tab of your Streamlabs dashboard then click on API Tokens, copy your socket API token and finally paste the code on the "streamlabs_token" variable in the "config.js" file.

StreamElements Token

To get the token you'll have to go to your StreamElements channels dashboard, then click on show secrets, copy the Overlay token and paste the code on the "streamelements_token" variable in the "config.js" file.

Streamloots Token

To get the token you'll have to go to your Streamloots creator dashboard, then to alerts & widgets, then go to alerts, then copy the last part of the alerts url and finally paste the code on the "streamloots_token" variable in the "config.js" file.

Initial Time

You can set the initial time of the timer by setting the hours, minutes and seconds to be added when the timer is created.

Happy Hour

If this is true, you can turn enable Happy Hour with the Shortcut. If it is false, the feature is disabled and cant be enabled.

You have to set the Happy Hour time values manually.

If enabled it can randomly activate the Happy Hour. It will last for one hour, but can be turned off manually with the Shortkey.

In the Config you can set a specific Date and Time. At that a Happy Hour will happen.

Bulk

This enables that multiple Subs get added to the timer at once.

For Example when a user gifts 10 Subs.

Full control on what to use

You can enable and disable if you want to add time for Subscriptions, Bits, Donations or Chests.

Other Values

Change the other values to set the amount of seconds that will be added for the subscriptions, donations... And the minimum donation amounts to trigger the countdown increase.

Add To OBS

To add it to OBS you just have to drag the "index.html" file to the sources section or add a browser source that points to the "index.html" file.

Known Problems

Only Streamelements Token in config.js does not add time for Subscriptions. Emulate with the Overlay Editor does work.