Skip notice improvement.

This commit is contained in:
Ajay Ramachandran
2020-02-18 15:57:40 -05:00
parent aeabf806ac
commit cd58f6bc73
2 changed files with 7 additions and 2 deletions

View File

@@ -95,7 +95,8 @@ var skipNoticeContentContainer = () => ({
v: video,
reskipSponsorTime,
hiddenSponsorTimes,
updatePreviewBar
updatePreviewBar,
onMobileYouTube
});
//get messages from the background script and the popup

View File

@@ -56,6 +56,9 @@ class SkipNotice {
noticeElement.classList.add("sponsorSkipObject");
noticeElement.classList.add("sponsorSkipNotice");
noticeElement.style.zIndex = String(50 + amountOfPreviousNotices);
if (contentContainer().onMobileYouTube) {
noticeElement.style.bottom = "3em";
}
//add mouse enter and leave listeners
noticeElement.addEventListener("mouseenter", this.pauseCountdown.bind(this));
@@ -173,7 +176,8 @@ class SkipNotice {
noticeElement.appendChild(secondRow);
//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) {
//for embeds
let player = document.getElementById("player");