mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Only show refresh button in popup if segments are found
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<p id="loadingIndicator">__MSG_noVideoID__</p>
|
<p id="loadingIndicator">__MSG_noVideoID__</p>
|
||||||
<!-- If the video was found in the database -->
|
<!-- If the video was found in the database -->
|
||||||
<p id="videoFound"></p>
|
<p id="videoFound"></p>
|
||||||
<button class="sbSlimButton" id="refreshSegmentsButton" title="__MSG_refreshSegments__">
|
<button class="sbSlimButton hidden" id="refreshSegmentsButton" title="__MSG_refreshSegments__">
|
||||||
<img id="refreshSegments" src="/icons/refresh.svg"/>
|
<img id="refreshSegments" src="/icons/refresh.svg"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -292,10 +292,12 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
|
|
||||||
if (request.found) {
|
if (request.found) {
|
||||||
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsorFound");
|
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsorFound");
|
||||||
|
PageElements.refreshSegmentsButton.classList.remove("hidden");
|
||||||
|
|
||||||
displayDownloadedSponsorTimes(request);
|
displayDownloadedSponsorTimes(request);
|
||||||
} else {
|
} else {
|
||||||
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsor404");
|
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsor404");
|
||||||
|
PageElements.refreshSegmentsButton.classList.add("hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user