-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbetter-twitch.user.js
42 lines (38 loc) · 1.42 KB
/
better-twitch.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ==UserScript==
// @name Better Twitch
// @author https://github.com/qligier/
// @namespace qligier
// @version 20190802
// @updateURL https://raw.githubusercontent.com/qligier/web_userscripts/master/better-twitch.user.js
// @match https://www.twitch.tv/*
// @grant none
// @run-at document-end
// ==/UserScript==
/**
* This userscript is updated from GitHub.
*/
const stylesheetContent = `
/* Hide unwanted elements */
.top-nav__prime, /* Prime button from topbar */
.top-nav__menu a[href^="https://twitch.amazon.com"], /* Prime link from topbar navigation */
.top-nav__menu a[href^="https://www.twitch.tv/prime"], /* Prime link from topbar navigation */
.extension-taskbar-card-container, /* Prime card in player */
.extension-overlays, /* Prime card in player */
.extensions-video-overlay-size-container, /* Overlay in player */
.extensions-dock-card, /* Overlay in player */
button[aria-label="Subscribe"], /* Subscribe button */
button[data-a-target="top-nav-get-bits-button"], /* Get Bits button in topnav */
.side-nav /* Sidebar */
{
display: none!important;
}
/* Make the topbar smaller */
.top-nav { height: 3.6rem!important; }
.tw-pd-1 { padding: 0.3rem 1rem!important; }
.tw-pd-y-1 { padding-top: 0.2rem!important; }
`;
(function () {
const stylesheet = document.createElement('style');
stylesheet.innerHTML = stylesheetContent;
document.body.appendChild(stylesheet);
})();