diff --git a/out/PiPer-chrome.zip b/out/PiPer-chrome.zip
index 9ee8fc0..9d34425 100644
Binary files a/out/PiPer-chrome.zip and b/out/PiPer-chrome.zip differ
diff --git a/out/PiPer-safari-legacy.safariextz b/out/PiPer-safari-legacy.safariextz
index 7742f40..de88a52 100644
Binary files a/out/PiPer-safari-legacy.safariextz and b/out/PiPer-safari-legacy.safariextz differ
diff --git a/out/PiPer-safari.pkg b/out/PiPer-safari.pkg
index 6743ebc..5531a77 100644
Binary files a/out/PiPer-safari.pkg and b/out/PiPer-safari.pkg differ
diff --git a/src/common/scripts/resources/twitch.js b/src/common/scripts/resources/twitch.js
index 97e1a67..a6763e3 100644
--- a/src/common/scripts/resources/twitch.js
+++ b/src/common/scripts/resources/twitch.js
@@ -5,44 +5,36 @@ import { videoPlayingPictureInPicture, togglePictureInPicture } from './../video
export const domain = 'twitch';
export const resource = {
- buttonClassName: 'player-button',
+ buttonClassName: 'tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-button-icon tw-button-icon--overlay tw-core-button tw-core-button--overlay tw-inline-flex tw-relative tw-tooltip-wrapper',
buttonDidAppear: function() {
- const neighbourButton = document.querySelector('.qa-fullscreen-button');
- const neighbourTooltip = /** @type {HTMLElement} */ (neighbourButton.querySelector('.player-tip'));
+ // Add tooltip
const button = getButton();
const title = button.title;
- const /** string */ neighbourTitle = neighbourTooltip.dataset['tip'];
button.title = '';
- button.addEventListener('mouseover', function() {
- neighbourTooltip.dataset['tip'] = title;
- neighbourTooltip.style.display = 'block';
- });
- button.addEventListener('mouseout', function() {
- neighbourTooltip.style.display = '';
- neighbourTooltip.dataset['tip'] = neighbourTitle;
- });
- neighbourButton.addEventListener('click', function() {
+ const tooltip = /** @type {HTMLElement} */ (document.createElement('div'));
+ tooltip.className = 'tw-tooltip tw-tooltip--align-right tw-tooltip--up';
+ tooltip.appendChild(document.createTextNode(title));
+ button.appendChild(tooltip);
+
+ // Fix issues with fullscreen when activated while video playing Picture-in-Picture
+ const fullscreenButton = document.querySelector("[data-a-target='player-fullscreen-button']");
+ if (!fullscreenButton) return;
+ fullscreenButton.addEventListener('click', function() {
const video = /** @type {?HTMLVideoElement} */ (getResource().videoElement());
if (videoPlayingPictureInPicture(video)) togglePictureInPicture(video);
});
- neighbourButton.style.order = 2;
-
- // Ensure "Watch on Twitch" button is the rightmost button
- const twitchButton = document.querySelector('.qa-watch-twitch-button');
- if (twitchButton) twitchButton.style.order = 3;
},
- buttonHoverStyle: /** CSS */ (`
- filter: brightness(50%) sepia(1) hue-rotate(219deg) saturate(117%) brightness(112%);
- `),
+ buttonInsertBefore: function(/** Element */ parent) {
+ return parent.lastChild;
+ },
buttonParent: function() {
- return document.querySelector('.player-buttons-right');
+ return document.querySelector('.player-controls__right-control-group,.player-buttons-right');
},
buttonScale: 0.8,
- buttonStyle: /** CSS */ (`order: 1`),
captionElement: function() {
return document.querySelector('.player-captions-container');
},
videoElement: function() {
- return document.querySelector('.player-video video');
+ return document.querySelector('video[src]');
},
};
\ No newline at end of file
diff --git a/src/safari-legacy/update.plist b/src/safari-legacy/update.plist
index 862da2b..328d65d 100644
--- a/src/safari-legacy/update.plist
+++ b/src/safari-legacy/update.plist
@@ -8,9 +8,9 @@
CFBundleIdentifier
com.amarcus.safari.piper
CFBundleShortVersionString
- 1.0.3
+ 1.0.4
CFBundleVersion
- 222
+ 223
Developer Identifier
BQ6Q24MF9X
URL