mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Skip notice improvement.
This commit is contained in:
@@ -95,7 +95,8 @@ var skipNoticeContentContainer = () => ({
|
|||||||
v: video,
|
v: video,
|
||||||
reskipSponsorTime,
|
reskipSponsorTime,
|
||||||
hiddenSponsorTimes,
|
hiddenSponsorTimes,
|
||||||
updatePreviewBar
|
updatePreviewBar,
|
||||||
|
onMobileYouTube
|
||||||
});
|
});
|
||||||
|
|
||||||
//get messages from the background script and the popup
|
//get messages from the background script and the popup
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ class SkipNotice {
|
|||||||
noticeElement.classList.add("sponsorSkipObject");
|
noticeElement.classList.add("sponsorSkipObject");
|
||||||
noticeElement.classList.add("sponsorSkipNotice");
|
noticeElement.classList.add("sponsorSkipNotice");
|
||||||
noticeElement.style.zIndex = String(50 + amountOfPreviousNotices);
|
noticeElement.style.zIndex = String(50 + amountOfPreviousNotices);
|
||||||
|
if (contentContainer().onMobileYouTube) {
|
||||||
|
noticeElement.style.bottom = "3em";
|
||||||
|
}
|
||||||
|
|
||||||
//add mouse enter and leave listeners
|
//add mouse enter and leave listeners
|
||||||
noticeElement.addEventListener("mouseenter", this.pauseCountdown.bind(this));
|
noticeElement.addEventListener("mouseenter", this.pauseCountdown.bind(this));
|
||||||
@@ -173,7 +176,8 @@ class SkipNotice {
|
|||||||
noticeElement.appendChild(secondRow);
|
noticeElement.appendChild(secondRow);
|
||||||
|
|
||||||
//get reference node
|
//get reference node
|
||||||
let referenceNode = document.getElementById("movie_player") || document.querySelector("#player-container .video-js");
|
let referenceNode = document.getElementById("player-container-id")
|
||||||
|
|| document.getElementById("movie_player") || document.querySelector("#player-container .video-js");
|
||||||
if (referenceNode == null) {
|
if (referenceNode == null) {
|
||||||
//for embeds
|
//for embeds
|
||||||
let player = document.getElementById("player");
|
let player = document.getElementById("player");
|
||||||
|
|||||||
Reference in New Issue
Block a user