mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock
This commit is contained in:
@@ -7,14 +7,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IDs on container element (when inserted in page), <html> element,
|
* Container when popup displayed in-page
|
||||||
* <body> element and main container
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#sponsorBlockPopupContainer {
|
#sponsorBlockPopupContainer {
|
||||||
|
position: relative;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable fixed popup width when displayed in-page
|
||||||
|
*/
|
||||||
|
|
||||||
|
#sponsorBlockPopupContainer #sponsorBlockPopupBody {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main containers
|
||||||
|
*/
|
||||||
|
|
||||||
#sponsorBlockPopupHTML {
|
#sponsorBlockPopupHTML {
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
@@ -41,6 +53,25 @@
|
|||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Close popup button when displayed in-page
|
||||||
|
*/
|
||||||
|
|
||||||
|
.sbCloseButton {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
padding: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sbCloseButton:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Header logo
|
* Header logo
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1677,13 +1677,15 @@ function openInfoMenu() {
|
|||||||
popup.innerHTML = htmlData;
|
popup.innerHTML = htmlData;
|
||||||
|
|
||||||
//close button
|
//close button
|
||||||
const closeButton = document.createElement("div");
|
const closeButton = document.createElement("button");
|
||||||
closeButton.innerText = chrome.i18n.getMessage("closePopup");
|
const closeButtonIcon = document.createElement("img");
|
||||||
closeButton.classList.add("smallLink");
|
closeButtonIcon.src = chrome.extension.getURL("icons/close.png");
|
||||||
closeButton.setAttribute("align", "center");
|
closeButtonIcon.width = 15;
|
||||||
|
closeButtonIcon.height = 15;
|
||||||
|
closeButton.appendChild(closeButtonIcon);
|
||||||
|
closeButton.setAttribute("title", chrome.i18n.getMessage("closePopup"));
|
||||||
|
closeButton.classList.add("sbCloseButton");
|
||||||
closeButton.addEventListener("click", closeInfoMenu);
|
closeButton.addEventListener("click", closeInfoMenu);
|
||||||
// Theme based color
|
|
||||||
closeButton.style.color = "var(--yt-spec-text-primary)";
|
|
||||||
|
|
||||||
//add the close button
|
//add the close button
|
||||||
popup.prepend(closeButton);
|
popup.prepend(closeButton);
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
PageElements.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment");
|
PageElements.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment");
|
||||||
}
|
}
|
||||||
PageElements.sponsorTimesViewsDisplay.innerText = viewCount.toLocaleString();
|
PageElements.sponsorTimesViewsDisplay.innerText = viewCount.toLocaleString();
|
||||||
PageElements.sponsorTimesViewsContainer.style.display = "unset";
|
PageElements.sponsorTimesViewsContainer.style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
||||||
showDonateWidget(viewCount);
|
showDonateWidget(viewCount);
|
||||||
@@ -212,7 +212,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PageElements.sponsorTimesSkipsDoneDisplay.innerText = Config.config.skipCount.toLocaleString();
|
PageElements.sponsorTimesSkipsDoneDisplay.innerText = Config.config.skipCount.toLocaleString();
|
||||||
PageElements.sponsorTimesSkipsDoneContainer.style.display = "unset";
|
PageElements.sponsorTimesSkipsDoneContainer.style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the amount of time this user has saved.
|
//get the amount of time this user has saved.
|
||||||
|
|||||||
Reference in New Issue
Block a user