File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ var script = document . createElement ( 'script' ) ;
2
+ script . src = chrome . extension . getURL ( 'inject.js' ) ;
3
+ ( document . head || document . documentElement ) . appendChild ( script ) ;
Original file line number Diff line number Diff line change
1
+ const clear = ( ( ) => {
2
+ const defined = v => v !== null && v !== undefined ;
3
+ const timeout = setInterval ( ( ) => {
4
+ const ad = [ ...document . querySelectorAll ( '.ad-showing' ) ] [ 0 ] ;
5
+ if ( defined ( ad ) ) {
6
+ const video = document . querySelector ( 'video' ) ;
7
+ if ( defined ( video ) ) {
8
+ video . currentTime = video . duration ;
9
+ }
10
+ }
11
+ } , 500 ) ;
12
+ return function ( ) {
13
+ clearTimeout ( timeout ) ;
14
+ }
15
+ } ) ( ) ;
Original file line number Diff line number Diff line change 14
14
" background.js"
15
15
]
16
16
},
17
+ "content_scripts" : [
18
+ {
19
+ "js" : [
20
+ " content.js"
21
+ ],
22
+ "matches" : [
23
+ " <all_urls>"
24
+ ]
25
+ }
26
+ ],
27
+ "web_accessible_resources" : [
28
+ " inject.js"
29
+ ],
17
30
"browser_action" : {
18
31
"default_icon" : {
19
32
"32" : " icon.png"
You can’t perform that action at this time.
0 commit comments