Twitch Status+

Switch to online and share activity status on page load™.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Twitch Status+
// @namespace    https://github.com/kittenparry/
// @version      0.1
// @description  Switch to online and share activity status on page load™.
// @author       kittenparry
// @match        https://*.twitch.tv/*
// @grant        none
// @license      GPL-3.0-or-later
// ==/UserScript==

setTimeout(() => {
	let avatar = document.querySelector('img[class="tw-block tw-border-radius-rounded tw-image tw-image-avatar"]');
	avatar.click();
	let online_toggle = document.querySelectorAll('input[class="ScToggleInput-sc-796zbf-1 doVmsZ tw-toggle__input"]')[0];
	if (!online_toggle.checked) {
		online_toggle.click();
		let activity_toggle = document.querySelectorAll('input[class="ScToggleInput-sc-796zbf-1 doVmsZ tw-toggle__input"]')[1];
		if (!activity_toggle.checked) {
			activity_toggle.click();
		}
		avatar.click();
	} else {
		avatar.click();
	}
}, 3000);