mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Add back show notice button
This commit is contained in:
@@ -343,11 +343,19 @@ label>p, #disableExtension>p, #usernameValue, #usernameElement > div > p,#sponso
|
|||||||
|
|
||||||
/* footer */
|
/* footer */
|
||||||
|
|
||||||
#sbFooter {
|
|
||||||
margin-bottom: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sbFooter > a {
|
#sbFooter > a {
|
||||||
color: var(--sb-main-fg-color);
|
color: var(--sb-main-fg-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#showNoticeAgain {
|
||||||
|
margin-top: 30px;
|
||||||
|
|
||||||
|
color: var(--sb-main-fg-color);
|
||||||
|
background: none;
|
||||||
|
border: 1px solid white;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -137,6 +137,8 @@
|
|||||||
<a href="https://matrix.to/#/+sponsorblock:ajay.app" target="_blank" rel="noopener">Matrix</a> |
|
<a href="https://matrix.to/#/+sponsorblock:ajay.app" target="_blank" rel="noopener">Matrix</a> |
|
||||||
<a id="helpButton" href="#">__MSG_help__</a>
|
<a id="helpButton" href="#">__MSG_help__</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<button id="showNoticeAgain" style="display: none" class="dangerButton popupElement">__MSG_showNotice__</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- Scripts that need to load after the html -->
|
<!-- Scripts that need to load after the html -->
|
||||||
<script src="./js/vendor.js" async></script>
|
<script src="./js/vendor.js" async></script>
|
||||||
|
|||||||
13
src/popup.ts
13
src/popup.ts
@@ -59,7 +59,7 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||||||
"enableSkipping",
|
"enableSkipping",
|
||||||
"toggleSwitch",
|
"toggleSwitch",
|
||||||
// Options
|
// Options
|
||||||
//"showNoticeAgain",
|
"showNoticeAgain",
|
||||||
"optionsButton",
|
"optionsButton",
|
||||||
"helpButton",
|
"helpButton",
|
||||||
// More controls
|
// More controls
|
||||||
@@ -109,7 +109,7 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||||||
toggleSkipping(!this.checked);
|
toggleSkipping(!this.checked);
|
||||||
});
|
});
|
||||||
PageElements.submitTimes.addEventListener("click", submitTimes);
|
PageElements.submitTimes.addEventListener("click", submitTimes);
|
||||||
//PageElements.showNoticeAgain.addEventListener("click", showNoticeAgain);
|
PageElements.showNoticeAgain.addEventListener("click", showNoticeAgain);
|
||||||
PageElements.setUsernameButton.addEventListener("click", setUsernameButton);
|
PageElements.setUsernameButton.addEventListener("click", setUsernameButton);
|
||||||
PageElements.usernameValue.addEventListener("click", setUsernameButton);
|
PageElements.usernameValue.addEventListener("click", setUsernameButton);
|
||||||
PageElements.submitUsername.addEventListener("click", submitUsername);
|
PageElements.submitUsername.addEventListener("click", submitUsername);
|
||||||
@@ -151,9 +151,9 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||||||
//if the don't show notice again variable is true, an option to
|
//if the don't show notice again variable is true, an option to
|
||||||
// disable should be available
|
// disable should be available
|
||||||
let dontShowNotice = Config.config.dontShowNotice;
|
let dontShowNotice = Config.config.dontShowNotice;
|
||||||
/*if (dontShowNotice != undefined && dontShowNotice) {
|
if (dontShowNotice != undefined && dontShowNotice) {
|
||||||
PageElements.showNoticeAgain.style.display = "unset";
|
PageElements.showNoticeAgain.style.display = "unset";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
utils.sendRequestToServer("GET", "/api/getUsername?userID=" + Config.config.userID, (res) => {
|
utils.sendRequestToServer("GET", "/api/getUsername?userID=" + Config.config.userID, (res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -227,7 +227,6 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PageElements.sponsorTimeSavedDisplay.innerText = getFormattedHours(Config.config.minutesSaved);
|
PageElements.sponsorTimeSavedDisplay.innerText = getFormattedHours(Config.config.minutesSaved);
|
||||||
//PageElements.sponsorTimeSavedContainer.style.display = "unset";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Must be delayed so it only happens once loaded
|
// Must be delayed so it only happens once loaded
|
||||||
@@ -782,11 +781,11 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*function showNoticeAgain() {
|
function showNoticeAgain() {
|
||||||
Config.config.dontShowNotice = false;
|
Config.config.dontShowNotice = false;
|
||||||
|
|
||||||
PageElements.showNoticeAgain.style.display = "none";
|
PageElements.showNoticeAgain.style.display = "none";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
function updateStartTimeChosen() {
|
function updateStartTimeChosen() {
|
||||||
//update startTimeChosen letiable
|
//update startTimeChosen letiable
|
||||||
|
|||||||
Reference in New Issue
Block a user