Skip to content

Commit e32db21

Browse files
committed
Add option to hide segment creation buttons in the popup
1 parent 6afcc6f commit e32db21

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

public/_locales

public/options/options.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
366366
</div>
367367

368-
<div data-type="toggle" data-sync="cleanPopup" data-no-safari="true">
368+
<div data-type="toggle" data-sync="cleanPopup">
369369
<div class="switch-container">
370370
<label class="switch">
371371
<input id="cleanPopup" type="checkbox" checked>
@@ -375,6 +375,20 @@
375375
__MSG_cleanPopup__
376376
</label>
377377
</div>
378+
379+
<br/>
380+
381+
<div data-type="toggle" data-sync="hideSegmentCreationInPopup">
382+
<div class="switch-container">
383+
<label class="switch">
384+
<input id="hideSegmentCreationInPopup" type="checkbox" checked>
385+
<span class="slider round"></span>
386+
</label>
387+
<label class="switch-label" for="hideSegmentCreationInPopup">
388+
__MSG_hideSegmentCreationInPopup__
389+
</label>
390+
</div>
391+
</div>
378392
</div>
379393

380394
<div data-type="toggle" data-sync="darkMode">

src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ interface SBConfig {
7777
shownDeArrowPromotion: boolean;
7878
showZoomToFillError2: boolean;
7979
cleanPopup: boolean;
80+
hideSegmentCreationInPopup: boolean;
8081

8182
// Used to cache calculated text color info
8283
categoryPillColors: {
@@ -349,6 +350,7 @@ const syncDefaults = {
349350
shownDeArrowPromotion: false,
350351
showZoomToFillError2: true,
351352
cleanPopup: false,
353+
hideSegmentCreationInPopup: false,
352354

353355
categoryPillColors: {},
354356

src/popup/PopupComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const PopupComponent = () => {
220220
}
221221

222222
{
223-
!Config.config.cleanPopup &&
223+
!Config.config.cleanPopup && !Config.config.hideSegmentCreationInPopup &&
224224
<SegmentSubmissionComponent
225225
videoID={videoID || ""}
226226
status={status.status}

0 commit comments

Comments
 (0)