Wokecat Amongus Buttons

Sus

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey 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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Wokecat Amongus Buttons
// @namespace    http://wokecat.com
// @version      1.0
// @description  Sus
// @author       Kevin + Lamp + Sammich
// @match        https://wokecat.com/main
// @icon         https://www.google.com/s2/favicons?domain=wokecat.com
// @grant        none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// ==/UserScript==

$( document ).ready(function() {


 commsOcto.socket.on('userList', function(){

     setTimeout(() => {

menuOcto.manState({activePanel: menuView.userlist.panel.viewComponent.container});
const userListElement = document.getElementById("listedUsers").children;
for (let i = 0; i < userListElement.length; i++) {
	populateUserElement(userListElement[i]);
};

channelOcto.activeChannel.channelComms.socket.on("joined", function (channelName, data) {
	populateUserElement(document.getElementById(data.id));
});

function populateUserElement (userElement) {
	const userName = userElement.querySelector(".nickText").innerText;
	if (userName.includes("Bulb")) {
		const joinButton = document.createElement("BUTTON");
		joinButton.innerText = "Join";
		joinButton.addEventListener("click", function () {
			channelOcto.activeChannel.channelComms.handleInput('!join');
		});
		const startButton = document.createElement("BUTTON");
		startButton.innerText = "Start";
		startButton.addEventListener("click", function () {
			channelOcto.activeChannel.channelComms.handleInput('!start');
		});
		const wordsButton = document.createElement("BUTTON");
		wordsButton.innerText = "Kill Words";
		wordsButton.addEventListener("click", function () {
			channelOcto.activeChannel.channelComms.handleInput('/pm Bulb|!words');
		});
		const commandsButton = document.createElement("BUTTON");
		commandsButton.innerText = "Commands";
		commandsButton.addEventListener("click", function () {
			channelOcto.activeChannel.channelComms.handleInput('/pm Bulb|!commands');
		});
		userElement.children[0].append(joinButton);
		userElement.children[0].append(startButton);
		userElement.children[0].append(wordsButton);
		userElement.children[0].append(commandsButton);
	};
	const checkButton = document.createElement("BUTTON");
	checkButton.innerText = "Check On";
	checkButton.addEventListener("click", function () {
		channelOcto.activeChannel.channelComms.handleInput('/pm Bulb|!check ' + userName);
	});
	const voteButton = document.createElement("BUTTON");
	voteButton.innerText = "Vote For";
	voteButton.addEventListener("click", function () {
		channelOcto.activeChannel.channelComms.handleInput('!vote ' + userName);
	});
	const targetButton = document.createElement("BUTTON");
	targetButton.innerText = "Target";
	targetButton.addEventListener("click", function () {
		channelOcto.activeChannel.channelComms.handleInput('/pm Bulb|!target ' + userName);
	});
	userElement.children[0].append(checkButton);
	userElement.children[0].append(voteButton);
	userElement.children[0].append(targetButton);
};

         }, 0);
 });

});