Skip to content

Instantly share code, notes, and snippets.

@viller239
Last active June 13, 2019 20:15
Show Gist options
  • Save viller239/f24cd2c89a8db2a0bc47d771797082a4 to your computer and use it in GitHub Desktop.
Save viller239/f24cd2c89a8db2a0bc47d771797082a4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide Twitch Annoyances
// @namespace http://twitch.tv
// @version 1.5
// @description hides bits/subs/promos/shop
// @author Viller
// @match *://*.twitch.tv/*
// @grant none
// ==/UserScript==
const style = document.createElement('style');
style.innerHTML = `
[data-a-target*="bits"],
[data-target*="bits"],
[data-a-target*="subscribe"],
[data-target*="subscribe"],
[data-a-target*="live"],
[data-target*="live"],
[data-a-target*="prime"],
[data-target*="prime"],
.top-nav__prime,
.front-page-carousel,
.pinned-cheer-v2,
.upsell-banner {
display: none;
}
.video-player__container.player {
bottom: 0;
}
.pl-controls-top,
.pl-controls-bottom {
background: transparent;
}
`.replace(/;/gi, ' !important;');
document.documentElement.appendChild(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment