Improved Twitch tooltip reliability and fixed full screen button bug

Fixed bug that could prevent tooltip in Twitch from showing and from
entering full screen whilst in picture in picture mode
This commit is contained in:
amarcu5
2017-05-30 21:42:46 +01:00
parent 21602c6661
commit 38246929a9
3 changed files with 12 additions and 7 deletions
Binary file not shown.
+11 -6
View File
@@ -292,17 +292,22 @@ const resources = {
buttonClassName: 'player-button',
buttonDidAppear: function() {
const button = document.getElementById(BUTTON_ID);
const neighbourTooltip = /** @type {HTMLElement} */ (button.nextSibling.querySelector('.player-tip'));
const /** string */ previousTitle = neighbourTooltip.dataset['tip'];
const neighbourButton = button.nextSibling;
const neighbourTooltip = /** @type {HTMLElement} */ (neighbourButton.querySelector('.player-tip'));
const /** string */ title = button.title;
const /** string */ neighbourTitle = neighbourTooltip.dataset['tip'];
button.title = '';
button.addEventListener('mouseover', function(e){
neighbourTooltip.dataset['tip'] = button.title;
neighbourTooltip.dataset['tip'] = title;
neighbourTooltip.style.display = 'block';
button.title = '';
});
button.addEventListener('mouseout', function(e){
neighbourTooltip.style.display = '';
button.title = neighbourTooltip.dataset['tip'];
neighbourTooltip.dataset['tip'] = previousTitle;
neighbourTooltip.dataset['tip'] = neighbourTitle;
});
neighbourButton.addEventListener('click', function(e){
const video = /** @type {?HTMLVideoElement} */ (currentResource.videoElement());
if (video) video.webkitSetPresentationMode('inline');
});
},
buttonHoverStyle: 'filter:brightness(50%)sepia(1)hue-rotate(219deg)saturate(117%)brightness(112%)',
+1 -1
View File
@@ -10,7 +10,7 @@
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<key>CFBundleVersion</key>
<string>29</string>
<string>30</string>
<key>Developer Identifier</key>
<string>BQ6Q24MF9X</string>
<key>URL</key>