diff --git a/SB.js b/SB.js
index 86582311..3026c90f 100644
--- a/SB.js
+++ b/SB.js
@@ -176,7 +176,8 @@ SB.defaults = {
"hideDiscordLink": false,
"invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
"invidiousUpdateInfoShowCount": 0,
- "autoUpvote": true
+ "autoUpvote": true,
+ "minDuration": 0
}
// Reset config
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 51017402..ca9ce167 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -386,5 +386,11 @@
},
"invidiousInfo2": {
"message": "You MUST enable it in the options for it to work."
- }
+ },
+ "minDuration": {
+ "message": "Minimum duration (seconds)"
+ },
+ "minDurationDescription": {
+ "message": "Sponsor segments shorter than the set value will be ignored."
+ }
}
diff --git a/content.js b/content.js
index fd36a886..0ad119fc 100644
--- a/content.js
+++ b/content.js
@@ -521,6 +521,10 @@ function checkSponsorTime(sponsorTimes, index, openNotice) {
lastTime = v.currentTime - 0.0001;
}
+ if (sponsorTimes[index][1] - sponsorTimes[index][0] < SB.config.minDuration) {
+ return false;
+ }
+
if (checkIfTimeToSkip(v.currentTime, sponsorTimes[index][0], sponsorTimes[index][1]) && !hiddenSponsorTimes.includes(index)) {
//skip it
skipToTime(v, index, sponsorTimes, openNotice);
diff --git a/options/options.css b/options/options.css
index 7cfa094e..bc8e2f92 100644
--- a/options/options.css
+++ b/options/options.css
@@ -309,4 +309,13 @@ h1,h2,h3,h4,h5,h6 {
svg {
text-decoration: none;
+}
+
+.number-container:before {
+ content: attr(label-name);
+ padding-right: 4px;
+ width: max-content;
+
+ font-size: 14px;
+ color: white;
}
\ No newline at end of file
diff --git a/options/options.html b/options/options.html
index 19354139..1eea3cb5 100644
--- a/options/options.html
+++ b/options/options.html
@@ -78,6 +78,20 @@
+