UWOSLAB Fixer

Replace UWOSLAB Channel name on Twitch with "You Woah Slab (UWOSLAB)"

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.

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

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         UWOSLAB Fixer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Replace UWOSLAB Channel name on Twitch with "You Woah Slab (UWOSLAB)"
// @author       DaxDaFox
// @match        *://*/*
// @grant        none
// @run-at       document-end
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function replaceText() {
        // Use the exact CSS selector provided
        const elements = document.querySelectorAll('.tw-title.ioKjUT.InjectLayout-sc-1i43xsx-0.lbYztg.bqyYtA.ScTitleText-sc-d9mj2s-0.CoreText-sc-1txzju1-0');
        
        elements.forEach(element => {
            if (element.textContent.trim() !== "You Woah Slab (UWOSLAB)") {
                element.textContent = "You Woah Slab (UWOSLAB)";
                console.log('Replaced text in element:', element);
            }
        });
    }

    // run
    replaceText();

    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
                // Small delay to ensure elements are fully rendered
                setTimeout(replaceText, 100);
            }
        });
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

    //run periodically as a fallback
    setInterval(replaceText, 2000);
})();