Added Udemy support

This commit is contained in:
amarcu5
2017-06-22 19:30:23 +01:00
parent 95ce6faab2
commit a652386ae7
5 changed files with 26 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@ Get the latest release from the [Safari Extension Gallery](https://safari-extens
* [Plex](http://www.plex.tv)
* [The Onion](http://www.theonion.com)
* [Twitch](http://www.twitch.tv)
* [Udemy](http://www.udemy.com)
* [Vevo](http://www.vevo.com)
* [Vice](http://www.vice.com)
* [Vid.me](http://www.vid.me)
Binary file not shown.
+2
View File
@@ -76,6 +76,8 @@
<string>*.theonion.com</string>
<string>twitch.tv</string>
<string>*.twitch.tv</string>
<string>udemy.com</string>
<string>*.udemy.com</string>
<string>vevo.com</string>
<string>*.vevo.com</string>
<string>vice.com</string>
+22
View File
@@ -499,6 +499,28 @@ const resources = {
return e && e.querySelector('video');
},
},
'udemy': {
buttonClassName: 'vjs-control vjs-button',
buttonDidAppear: function() {
document.querySelector('.vjs-fullscreen-control').addEventListener('click', function() {
const video = /** @type {?HTMLVideoElement} */ (currentResource.videoElement());
if (video) video.webkitSetPresentationMode('inline');
});
},
buttonParent: function() {
return document.querySelector('.vjs-control-bar');
},
buttonScale: 0.7,
buttonStyle: 'order:7',
captionElement: function() {
const e = currentResource.videoElement();
return /** @type {?Element} */ (e && e.parentNode.querySelector('.vjs-text-track-display'));
},
videoElement: function() {
return document.querySelector('video.vjs-tech');
},
},
'vevo': {
buttonClassName: 'player-control',
+1 -1
View File
@@ -10,7 +10,7 @@
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<key>CFBundleVersion</key>
<string>47</string>
<string>48</string>
<key>Developer Identifier</key>
<string>BQ6Q24MF9X</string>
<key>URL</key>