forked from jpgohlke/twitch-chat-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (94 loc) · 6.94 KB
/
index.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Twitch-chat-filter by jpgohlke</title>
<link rel="stylesheet" href="www/css/styles.css">
<link rel="stylesheet" href="www/css/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Twitch.TV Chat Filter</h1>
<p>A Javascript userscript to filter chat commands and other spam from the chat on the Twitch Plays Pokemon stream</p>
<p class="view"><a href="https://github.com/jpgohlke/twitch-chat-filter">View the Project on GitHub <small>jpgohlke/twitch-chat-filter</small></a></p>
<ul>
<li><a href="https://github.com/jpgohlke/twitch-chat-filter/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/jpgohlke/twitch-chat-filter/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/jpgohlke/twitch-chat-filter">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>
<a name="twitchtv-chat-filter" class="anchor" href="#twitchtv-chat-filter"><span class="octicon octicon-link"></span></a>Twitch.TV Chat Filter</h1>
<p>A Javascript userscript to filter chat commands and other spam from the chat on the <a href="http://www.twitch.tv/twitchplayspokemon">Twitch Plays Pokemon stream</a></p>
<p><img src="www/img/tpp-chat-filter-preview.png" alt="Chat-Filter Preview" title="State of Screenshot: 0dc02e14e8"></p>
<h2>
<a name="using-the-script-as-a-javascript-bookmark" class="anchor" href="#using-the-script-as-a-javascript-bookmark"><span class="octicon octicon-link"></span></a>Using the script as a JavaScript bookmark</h2>
<p>Fast and lightweight way to run the script. </p>
<p>Just drag the button below onto your bookmarks bar and click on it when you have the TPP-Tab open to enable the script.</p>
<p><a href="javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js';})();"><img src="www/img/bookmarklet-button.png" alt="Twitch Spam Filter"></a></p>
<p><strong>Alternate Method:</strong></p>
<ol>
<li><p>Go to the bookmark menu of your browser and add a new bookmark with the title of your choice.</p></li>
<li><p>Copy the following snippet and paste it into the URL-Field:<br/>
<code>javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js';})();</code></p></li>
<li><p>Save the Bookmark.</p></li>
<li><p>From now on, you can just click on that bookmark when you have the TPP-Tab open to enable the script.</p></li>
</ol><h2>
<a name="installing-the-script-using-greasemonkey-firefox" class="anchor" href="#installing-the-script-using-greasemonkey-firefox"><span class="octicon octicon-link"></span></a>Installing the script using Greasemonkey (Firefox)</h2>
<p>Installing the userscript via Greasemonkey will automatically run it everytime you visit the TPP stream.</p>
<ol>
<li><p>Install the <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/">Greasemonkey extension</a> for Firefox.</p></li>
<li><p>Click this link to navigate to the script URL: <a href="https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js">https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js</a></p></li>
<li><p>Greasemonkey will detect the userscript and ask what to do with it. Tell it to "Install" the script.</p></li>
<li><p>Refresh the page TPP stream page.</p></li>
</ol><h2>
<a name="installing-the-script-using-tampermonkey-chrome" class="anchor" href="#installing-the-script-using-tampermonkey-chrome"><span class="octicon octicon-link"></span></a>Installing the script using Tampermonkey (Chrome)</h2>
<p>Tampermonkey lets you install userscripts in Chrome, similarly to how Greasemonkey does it in Firefox.</p>
<ol>
<li><p>Install the <a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo/related">Tampermonkey extension</a> for Chrome.</p></li>
<li><p>Click this link to navigate to the script URL: <a href="https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js">https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js</a></p></li>
<li><p>Tampermonkey will detect the userscript and will open a new tab. Click on <code>Install to Tampermonkey</code> and click Ok.</p></li>
<li><p>Refresh the page TPP stream page.</p></li>
</ol><h2>
<a name="run-the-script-via-the-console-no-extensions-needed" class="anchor" href="#run-the-script-via-the-console-no-extensions-needed"><span class="octicon octicon-link"></span></a>Run the script via the console (no extensions needed)</h2>
<p>If you don't want or can't install one of the previously mentioned browser extensions, one possibility is to run the script via the developer console. However, you will need to rerun the script every time you refresh the stream.</p>
<ol>
<li>
<p>On the TPP stream page, open your broser's developer console.</p>
<ul>
<li>On Firefox, press <code>Ctrl</code> + <code>Shift</code> + <code>K</code>
</li>
<li>On Chrome, press <code>Ctrl</code> + <code>Shift</code> + <code>J</code>
</li>
<li>On Safari, press <code>Ctrl</code> + <code>Alt</code> + <code>I</code>
</li>
<li>On IE9+, press <code>F12</code>
</li>
<li>On Opera, press <code>Ctrl</code> + <code>Shift</code> + <code>I</code>
</li>
<li>If you are having trouble opening your console, try reading the in depth explanation <a href="http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers">here</a>
</li>
</ul>
</li>
<li><p>Copy the following snippet and paste it into the developer console on the TPP page: <code>javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://jpgohlke.github.io/twitch-chat-filter/chat_filter.user.js';})();</code></p></li>
<li><p>Press <code>Enter</code> to run the code.</p></li>
</ol><h2>
<a name="developers" class="anchor" href="#developers"><span class="octicon octicon-link"></span></a>Developers</h2>
<p>All changes should be made in <code>chat_filter.user.js</code> from now on. Please try to ensure that your changes work in both the console and with the UserScript.</p>
<p>Update the compressed (minified) version whenever you make a substantive update. No need for small things like formatting or comments, obviously.</p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/jpgohlke">jpgohlke</a></p>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="www/js/scale.fix.js"></script>
</body>
</html>