Skip to content

Commit

Permalink
beta support for twitch's beta site
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Sep 18, 2017
1 parent 579697e commit b4120e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "BetterTTV",
"author": "Night",
"version": "7.0.26",
"version": "7.0.27",
"description": "BetterTTV enhances Twitch with new features, bug fixes, and reduced clutter.",
"main": "betterttv.js",
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
(() => {
if (!String.prototype.includes || !Array.prototype.findIndex) return;
if (window.location.pathname.endsWith('.html')) return;
if (window.location.pathname.endsWith('.html') || window.location.hostname === 'player.twitch.tv') return;

if (window.location.hostname === 'go.twitch.tv') {
const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://beta.betterttv.net/betterttv.js';
const head = document.getElementsByTagName('head')[0];
if (!head) return;
head.appendChild(script);
return;
}

const Raven = require('raven-js');

Expand Down

0 comments on commit b4120e3

Please sign in to comment.