forked from Pmmlabs/OpenPeriscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inject.js
27 lines (26 loc) · 1003 Bytes
/
inject.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
if (location.href == 'https://api.twitter.com/oauth/authorize') {
var meta = $('meta[http-equiv="refresh"]');
meta.attr('content', meta.attr('content').replace('twittersdk', 'app'));
} else if (location.host == "www.periscope.tv") {
if (!Array.prototype.findIndex) {
Array.prototype.findIndex = function (predicate) {
if (this == null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;
for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return i;
}
}
return -1;
};
}
}