Add initial userscript

This commit is contained in:
Calvin Montgomery 2016-08-15 21:00:56 -07:00
parent d51722c466
commit 4feee02e33
8 changed files with 205 additions and 6 deletions

View file

@ -0,0 +1,6 @@
window.GoogleDrivePlayer = class GoogleDrivePlayer extends VideoJSPlayer
constructor: (data) ->
if not (this instanceof GoogleDrivePlayer)
return new GoogleDrivePlayer(data)
super(data)

View file

@ -2,7 +2,7 @@ TYPE_MAP =
yt: YouTubePlayer
vi: VimeoPlayer
dm: DailymotionPlayer
gd: GoogleDriveYouTubePlayer
gd: GoogleDrivePlayer
gp: VideoJSPlayer
fi: FilePlayer
jw: FilePlayer
@ -33,7 +33,7 @@ window.loadMediaPlayer = (data) ->
else if data.type is 'gd'
try
if data.meta.html5hack
window.PLAYER = new VideoJSPlayer(data)
window.PLAYER = new window.GoogleDrivePlayer(data)
else
window.PLAYER = new GoogleDriveYouTubePlayer(data)
catch e