-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtwitch_hide_channel_leaderboard.user.js
More file actions
53 lines (50 loc) · 2.04 KB
/
twitch_hide_channel_leaderboard.user.js
File metadata and controls
53 lines (50 loc) · 2.04 KB
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
43
44
45
46
47
48
49
50
51
52
53
// ==UserScript==
// @name Hide Twitch Channel Leaderboard
// @namespace https://github.com/StaticPH
// @match https://www.twitch.tv/*
// @match https://www.twitch.tv/moderator/*
// @match https://www.twitch.tv/popout/*
// @match https://www.twitch.tv/videos/*
// @exclude-match https://www.twitch.tv/videos
// @exclude-match https://www.twitch.tv/directory*
// @exclude-match https://www.twitch.tv/p/*
// @exclude-match https://www.twitch.tv/downloads*
// @exclude-match https://www.twitch.tv/jobs*
// @exclude-match https://www.twitch.tv/settings*
// @exclude-match https://www.twitch.tv/turbo*
// @exclude-match https://www.twitch.tv/annual-recap
// @version 1.2.1
// @createdAt 6/19/2020
// @author StaticPH
// @description Hides the stupid channel leaderboard on Twitch.tv
// @license MIT
// @updateURL https://raw.githubusercontent.com/StaticPH/Userscripts/master/twitch_hide_channel_leaderboard.user.js
// @downloadURL https://raw.githubusercontent.com/StaticPH/Userscripts/master/twitch_hide_channel_leaderboard.user.js
// @homepageURL https://github.com/StaticPH/UserScripts
// @supportURL https://github.com/StaticPH/UserScripts/issues
// @icon https://brand.twitch.tv/assets/logos/svg/glitch/purple.svg
// @grant GM.addStyle
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function(){
'use strict';
// Prefer asychronous Greasemonkey4-API GM.addStyle, but allow use of GM_addStyle as a fallback if necessary.
if (typeof GM === 'undefined'){
this.GM = {};
}
if (GM['addStyle'] === undefined){
console.log('GM.addStyle is not defined. Falling back to GM_addStyle Promise.');
GM['addStyle'] = function(...args){
return new Promise((onResolve, onReject) => {
try{ onResolve(GM_addStyle.apply(this, args)); }
catch(err){ onReject(err); }
});
}
}
GM.addStyle (`
div.channel-leaderboard.tw-z-default {
display: none;
}
`);
})();