diff options
author | Ajay <[email protected]> | 2022-01-05 15:16:29 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2022-01-05 15:16:29 -0500 |
commit | d23e434209faf6c3ff502422b679c7a0fc98aa53 (patch) | |
tree | 3341572099f575ca0ba8b3cb1dbf021f7aa42eb2 /src | |
parent | 040bce263855a1ff68cecb694f8da903e3df55ec (diff) | |
download | SponsorBlock-d23e434209faf6c3ff502422b679c7a0fc98aa53.tar.gz SponsorBlock-d23e434209faf6c3ff502422b679c7a0fc98aa53.zip |
Show full video on popup
Diffstat (limited to 'src')
-rw-r--r-- | src/popup.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/popup.ts b/src/popup.ts index 14d22dd8..8b5366f3 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -1,7 +1,7 @@ import Config from "./config"; import Utils from "./utils"; -import { SponsorTime, SponsorHideType, CategoryActionType } from "./types"; +import { SponsorTime, SponsorHideType, CategoryActionType, ActionType } from "./types"; import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes"; import { showDonationLink } from "./utils/configUtils"; import { getCategoryActionType } from "./utils/categoryUtils"; @@ -405,10 +405,15 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> { const textNode = document.createTextNode(utils.shortCategoryName(segmentTimes[i].category) + extraInfo); const segmentTimeFromToNode = document.createElement("div"); - segmentTimeFromToNode.innerText = utils.getFormattedTime(segmentTimes[i].segment[0], true) + + if (segmentTimes[i].actionType === ActionType.Full) { + segmentTimeFromToNode.innerText = chrome.i18n.getMessage("full"); + } else { + segmentTimeFromToNode.innerText = utils.getFormattedTime(segmentTimes[i].segment[0], true) + (getCategoryActionType(segmentTimes[i].category) !== CategoryActionType.POI ? " " + chrome.i18n.getMessage("to") + " " + utils.getFormattedTime(segmentTimes[i].segment[1], true) : ""); + } + segmentTimeFromToNode.style.margin = "5px"; sponsorTimeButton.appendChild(categoryColorCircle); |