mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
@@ -929,5 +929,11 @@
|
||||
},
|
||||
"youtubeKeybindWarning": {
|
||||
"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 {
|
||||
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">
|
||||
<div id="sponsorblockPopup" class="sponsorBlockPageBody sb-preload">
|
||||
|
||||
<div id="sbBetaServerWarning" class="hidden" title="__MSG_openOptionsPage__">
|
||||
__MSG_betaServerWarning__
|
||||
</div>
|
||||
|
||||
<header class="sbPopupLogo">
|
||||
<img src="icons/IconSponsorBlocker256px.png" alt="SponsorBlock" width="40" height="40" id="sponsorBlockPopupLogo">
|
||||
<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",
|
||||
"sponsorTimesDonateContainer",
|
||||
"sbConsiderDonateLink",
|
||||
"sbCloseDonate"
|
||||
"sbCloseDonate",
|
||||
"sbBetaServerWarning"
|
||||
].forEach(id => PageElements[id] = document.getElementById(id));
|
||||
|
||||
// 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);
|
||||
|
||||
if (Config.config.testingServer === true) {
|
||||
PageElements.sbBetaServerWarning.classList.toggle("hidden", false);
|
||||
PageElements.sbBetaServerWarning.addEventListener("click", function () {
|
||||
openOptionsAt("advanced");
|
||||
});
|
||||
}
|
||||
|
||||
//setup click listeners
|
||||
PageElements.sponsorStart.addEventListener("click", sendSponsorStartMessage);
|
||||
PageElements.whitelistToggle.addEventListener("change", function () {
|
||||
|
||||
Reference in New Issue
Block a user