mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +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>
|
||||
<!-- If the video was found in the database -->
|
||||
<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"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -292,10 +292,12 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
|
||||
if (request.found) {
|
||||
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsorFound");
|
||||
PageElements.refreshSegmentsButton.classList.remove("hidden");
|
||||
|
||||
displayDownloadedSponsorTimes(request);
|
||||
} else {
|
||||
PageElements.videoFound.innerHTML = chrome.i18n.getMessage("sponsor404");
|
||||
PageElements.refreshSegmentsButton.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user