-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitch video event listener hook.js
46 lines (39 loc) · 1.42 KB
/
twitch video event listener hook.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
43
44
45
// ==UserScript==
// @name twitch video event listener hook
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.twitch.tv/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @run-at document-start
// ==/UserScript==
//alert("jsввыыыdkfdddddhsf");
//(function() {
(()=>{
'use strict';
//alert("jsввыыыdkfhsf");
Element.prototype._addEventListener = Element.prototype.addEventListener;
//var KEK = EventTarget.prototype.addEventListener;
//Element.prototype.addEventListener = (a, b, c) => {
Element.prototype.addEventListener = function(a, b, c) {
debugger;
if (c==undefined) c=false;
//document.kik=this
//alert(this.nodeName)
if(this._addEventListener) this._addEventListener(a,b,c);
else {
console.log("shto");
}
//this._addEventListener(a,b,c);
//KEK.call(this,a,b,c);
//EventTarget.prototype._addEventListener.call(this,a,b,c);
if(this.nodeName!="VIDEO") return;
//alert("jsdkfhsf");
if (! this.eventListenerList) this.eventListenerList = {};
if (! this.eventListenerList[a]) this.eventListenerList[a] = [];
this.eventListenerList[a].push({listener:b,options:c});
};
debugger;
})();