-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathinject.js
37 lines (37 loc) · 884 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
28
29
30
31
32
33
34
35
36
37
__myYoutubeTools={
test:function(){
alert("dsdsdsd")
},
getMP: function(){
return document.getElementById('movie_player')
}
,pauseVideo: function(){
alert('hezone')
var t=__myYoutubeTools
t.clearPNSTo()
t.getMP().pauseVideo()
t.isPaused=true
}
,playVideo: function(){
var t=__myYoutubeTools
t.clearPNSTo()
t.getMP().playVideo()
t.isPaused=false
}
,clearPNSTo: function(){
var t=__myYoutubeTools
try{clearTimeout(t.toPNS);}catch(x){}
}
,isPaused: true
,toPNS: null
,playNpauseVideo: function(){
// debugger
var t=__myYoutubeTools
if(t.isPaused){
t.playVideo()
}else{
t.pauseVideo()
}
t.toPNS = setTimeout("__myYoutubeTools.playNpauseVideo()",1000);
}
}