mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 06:27:14 +03:00
@@ -929,5 +929,11 @@
|
|||||||
},
|
},
|
||||||
"youtubeKeybindWarning": {
|
"youtubeKeybindWarning": {
|
||||||
"message": "This is a built-in YouTube shortcut. Are you sure you want to use it?"
|
"message": "This is a built-in YouTube shortcut. Are you sure you want to use it?"
|
||||||
|
},
|
||||||
|
"betaServerWarning": {
|
||||||
|
"message": "BETA Server is enabled!"
|
||||||
|
},
|
||||||
|
"openOptionsPage": {
|
||||||
|
"message": "Open options page"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -544,3 +544,13 @@
|
|||||||
#sponsorBlockPopupBody .hidden {
|
#sponsorBlockPopupBody .hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sbBetaServerWarning {
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 700;
|
||||||
|
word-break: break-word;
|
||||||
|
color: var(--sb-main-fg-color);
|
||||||
|
background: var(--sb-red-bg-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
<body id="sponsorBlockPopupBody">
|
<body id="sponsorBlockPopupBody">
|
||||||
<div id="sponsorblockPopup" class="sponsorBlockPageBody sb-preload">
|
<div id="sponsorblockPopup" class="sponsorBlockPageBody sb-preload">
|
||||||
|
|
||||||
|
<div id="sbBetaServerWarning" class="hidden" title="__MSG_openOptionsPage__">
|
||||||
|
__MSG_betaServerWarning__
|
||||||
|
</div>
|
||||||
|
|
||||||
<header class="sbPopupLogo">
|
<header class="sbPopupLogo">
|
||||||
<img src="icons/IconSponsorBlocker256px.png" alt="SponsorBlock" width="40" height="40" id="sponsorBlockPopupLogo">
|
<img src="icons/IconSponsorBlocker256px.png" alt="SponsorBlock" width="40" height="40" id="sponsorBlockPopupLogo">
|
||||||
<p class="u-mZ">SponsorBlock</p>
|
<p class="u-mZ">SponsorBlock</p>
|
||||||
|
|||||||
10
src/popup.ts
10
src/popup.ts
@@ -111,7 +111,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
"sbDonate",
|
"sbDonate",
|
||||||
"sponsorTimesDonateContainer",
|
"sponsorTimesDonateContainer",
|
||||||
"sbConsiderDonateLink",
|
"sbConsiderDonateLink",
|
||||||
"sbCloseDonate"
|
"sbCloseDonate",
|
||||||
|
"sbBetaServerWarning"
|
||||||
].forEach(id => PageElements[id] = document.getElementById(id));
|
].forEach(id => PageElements[id] = document.getElementById(id));
|
||||||
|
|
||||||
// Hide donate button if wanted (Safari, or user choice)
|
// Hide donate button if wanted (Safari, or user choice)
|
||||||
@@ -120,6 +121,13 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
}
|
}
|
||||||
PageElements.sbDonate.addEventListener("click", () => Config.config.donateClicked = Config.config.donateClicked + 1);
|
PageElements.sbDonate.addEventListener("click", () => Config.config.donateClicked = Config.config.donateClicked + 1);
|
||||||
|
|
||||||
|
if (Config.config.testingServer === true) {
|
||||||
|
PageElements.sbBetaServerWarning.classList.toggle("hidden", false);
|
||||||
|
PageElements.sbBetaServerWarning.addEventListener("click", function () {
|
||||||
|
openOptionsAt("advanced");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//setup click listeners
|
//setup click listeners
|
||||||
PageElements.sponsorStart.addEventListener("click", sendSponsorStartMessage);
|
PageElements.sponsorStart.addEventListener("click", sendSponsorStartMessage);
|
||||||
PageElements.whitelistToggle.addEventListener("change", function () {
|
PageElements.whitelistToggle.addEventListener("change", function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user