mirror of
https://github.com/gosticks/PiPer.git
synced 2026-08-12 04:50:20 +00:00
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:
Binary file not shown.
+11
-6
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user