mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Add tooltip about filler category
This commit is contained in:
@@ -814,9 +814,6 @@
|
|||||||
"Credits": {
|
"Credits": {
|
||||||
"message": "Credits"
|
"message": "Credits"
|
||||||
},
|
},
|
||||||
"highlightNewFeature": {
|
|
||||||
"message": "New! Get to the point of the video with one click with the new highlight category"
|
|
||||||
},
|
|
||||||
"LearnMore": {
|
"LearnMore": {
|
||||||
"message": "Learn More"
|
"message": "Learn More"
|
||||||
},
|
},
|
||||||
@@ -837,5 +834,8 @@
|
|||||||
},
|
},
|
||||||
"SponsorTimeEditScrollNewFeature": {
|
"SponsorTimeEditScrollNewFeature": {
|
||||||
"message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes."
|
"message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes."
|
||||||
|
},
|
||||||
|
"fillerNewFeature": {
|
||||||
|
"message": "New! Skip tangents and jokes with the filler category. Enable in options"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ interface SBConfig {
|
|||||||
locked: string
|
locked: string
|
||||||
},
|
},
|
||||||
scrollToEditTimeUpdate: boolean,
|
scrollToEditTimeUpdate: boolean,
|
||||||
|
fillerUpdate: boolean,
|
||||||
|
|
||||||
// What categories should be skipped
|
// What categories should be skipped
|
||||||
categorySelections: CategorySelection[],
|
categorySelections: CategorySelection[],
|
||||||
@@ -202,6 +203,7 @@ const Config: SBObject = {
|
|||||||
autoHideInfoButton: true,
|
autoHideInfoButton: true,
|
||||||
autoSkipOnMusicVideos: false,
|
autoSkipOnMusicVideos: false,
|
||||||
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
||||||
|
fillerUpdate: false,
|
||||||
|
|
||||||
categorySelections: [{
|
categorySelections: [{
|
||||||
name: "sponsor" as Category,
|
name: "sponsor" as Category,
|
||||||
|
|||||||
@@ -333,6 +333,25 @@ async function videoIDChange(id) {
|
|||||||
// Clear unsubmitted segments from the previous video
|
// Clear unsubmitted segments from the previous video
|
||||||
sponsorTimesSubmitting = [];
|
sponsorTimesSubmitting = [];
|
||||||
updateSponsorTimesSubmitting();
|
updateSponsorTimesSubmitting();
|
||||||
|
|
||||||
|
// Filler update
|
||||||
|
if (!Config.config.fillerUpdate) {
|
||||||
|
Config.config.fillerUpdate = true;
|
||||||
|
|
||||||
|
utils.wait(getControls).then(() => {
|
||||||
|
const playButton = document.querySelector(".ytp-play-button") as HTMLElement;
|
||||||
|
const allCategories = ["sponsor", "intro", "outro", "selfpromo", "interaction"];
|
||||||
|
if (playButton && allCategories.every((name) => Config.config.categorySelections.some((selection) => selection.name === name))) {
|
||||||
|
new Tooltip({
|
||||||
|
text: chrome.i18n.getMessage("fillerNewFeature"),
|
||||||
|
link: "https://wiki.sponsor.ajay.app/w/Filler_Tangent",
|
||||||
|
referenceNode: playButton.parentElement,
|
||||||
|
prependElement: playButton,
|
||||||
|
timeout: 10
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMobileControlsMutations(): void {
|
function handleMobileControlsMutations(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user