Last active
December 4, 2022 01:01
-
-
Save techygrrrl/512297134755bff2ccde764cb0036483 to your computer and use it in GitHub Desktop.
Make the Twitch UserVoice "Add a comment" box bigger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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