Skip to content

Instantly share code, notes, and snippets.

@techygrrrl
Last active December 4, 2022 01:01
Show Gist options
  • Save techygrrrl/512297134755bff2ccde764cb0036483 to your computer and use it in GitHub Desktop.
Save techygrrrl/512297134755bff2ccde764cb0036483 to your computer and use it in GitHub Desktop.
Make the Twitch UserVoice "Add a comment" box bigger
// ==UserScript==
// @name Big Twitch User Voice opinion box
// @namespace https://techygrrrl.stream
// @version 0.1
// @description Make the comment box bigger for your big, juicy opinions on Twitch's UserVoice
// @author techygrrrl
// @match https://twitch.uservoice.com/*
// @icon https://s3.amazonaws.com/uploads.uservoice.com/logo/design_setting/270912/original/TwitchExtrudedWordmarkPurpleUserVoice.png?1604096170
// @grant none
// ==/UserScript==
(function() {
'use strict';
let found = false
// Check and click in milliseconds
const CHECK_INTERVAL = 200
const DESIRED_HEIGHT = '30em'
setInterval(() => {
perform()
}, CHECK_INTERVAL)
function perform() {
if (found) return
let commentBoxes = document.querySelectorAll('[name="comment[text]"]')
if (!commentBoxes.length) return
commentBoxes.forEach((commentBox) => {
commentBox.style.height = DESIRED_HEIGHT
})
found = true
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment