// ==UserScript== // @name Turbo Subscription Button Remover // @namespace https://github.com/mirbyte/TwitchTV-Userscripts/edit/main/Turbo%20Subscription%20Button%20Remover.js // @match *://www.twitch.tv/* // @grant none // @version 1.8 // @author mirbyte // @description Edits the Turbo ad banner to be a transparent placeholder. Check GitHub page for the demonstration image. // @icon https://banner2.cleanpng.com/20180513/xie/kisspng-twitch-computer-icons-logo-5af8037d689af0.0981376915262032614285.jpg // @downloadURL none // ==/UserScript== (function() { 'use strict'; function editAdBanner() { // Target button var adButton = document.querySelector('.Layout-sc-1xcs6mc-0.hatIYF [data-a-target="tw-core-button-label-text"]'); var adButtonTexts = [ "Go Ad-Free for Free", "Poista mainokset ilmaiseksi", "Poista mainokset", "Get Ad-Free", "Go Ad-Free", // add more here ]; if (adButton && adButtonTexts.includes(adButton.textContent.trim())) { var adContainer = adButton.closest('.Layout-sc-1xcs6mc-0.hatIYF'); if (adContainer) { adContainer.innerHTML = ` `; //adContainer.style.width = 'auto'; //adContainer.style.height = 'auto'; //adContainer.style.padding = '0'; //adContainer.style.margin = '0'; //adContainer.style.backgroundColor = 'transparent'; //adContainer.style.border = 'none'; } } } editAdBanner(); // Observer to handle dynamic changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { editAdBanner(); }); }); observer.observe(document.body, { subtree: true, childList: true }); })();