mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +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,
|
||||
* <body> element and main container
|
||||
* Container when popup displayed in-page
|
||||
*/
|
||||
|
||||
#sponsorBlockPopupContainer {
|
||||
position: relative;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable fixed popup width when displayed in-page
|
||||
*/
|
||||
|
||||
#sponsorBlockPopupContainer #sponsorBlockPopupBody {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Main containers
|
||||
*/
|
||||
|
||||
#sponsorBlockPopupHTML {
|
||||
color-scheme: dark;
|
||||
}
|
||||
@@ -41,6 +53,25 @@
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -1677,13 +1677,15 @@ function openInfoMenu() {
|
||||
popup.innerHTML = htmlData;
|
||||
|
||||
//close button
|
||||
const closeButton = document.createElement("div");
|
||||
closeButton.innerText = chrome.i18n.getMessage("closePopup");
|
||||
closeButton.classList.add("smallLink");
|
||||
closeButton.setAttribute("align", "center");
|
||||
const closeButton = document.createElement("button");
|
||||
const closeButtonIcon = document.createElement("img");
|
||||
closeButtonIcon.src = chrome.extension.getURL("icons/close.png");
|
||||
closeButtonIcon.width = 15;
|
||||
closeButtonIcon.height = 15;
|
||||
closeButton.appendChild(closeButtonIcon);
|
||||
closeButton.setAttribute("title", chrome.i18n.getMessage("closePopup"));
|
||||
closeButton.classList.add("sbCloseButton");
|
||||
closeButton.addEventListener("click", closeInfoMenu);
|
||||
// Theme based color
|
||||
closeButton.style.color = "var(--yt-spec-text-primary)";
|
||||
|
||||
//add the close button
|
||||
popup.prepend(closeButton);
|
||||
|
||||
@@ -180,7 +180,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
PageElements.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment");
|
||||
}
|
||||
PageElements.sponsorTimesViewsDisplay.innerText = viewCount.toLocaleString();
|
||||
PageElements.sponsorTimesViewsContainer.style.display = "unset";
|
||||
PageElements.sponsorTimesViewsContainer.style.display = "block";
|
||||
}
|
||||
|
||||
showDonateWidget(viewCount);
|
||||
@@ -212,7 +212,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
}
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user