mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-12 18:04:20 +01:00
Add option to store downvotes when done in private tabs
This commit is contained in:
parent
6c71036356
commit
de094cb11f
4 changed files with 18 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 01ee7789673ac009fe1ea10be66fda7698534c4c
|
Subproject commit afc1c61dcea11bb9723105ff7730951ec9303d91
|
|
@ -634,7 +634,19 @@
|
||||||
|
|
||||||
<div class="small-description">__MSG_whatTrackDownvotes__</div>
|
<div class="small-description">__MSG_whatTrackDownvotes__</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-type="toggle" data-sync="trackDownvotesInPrivate" data-confirm-on="false">
|
||||||
|
<div class="switch-container">
|
||||||
|
<label class="switch">
|
||||||
|
<input id="trackDownvotesInPrivate" type="checkbox" checked>
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label class="switch-label" for="trackDownvotesInPrivate">
|
||||||
|
__MSG_enableTrackDownvotesInPrivate__
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div data-type="button-press" data-sync="copyDebugInformation" data-confirm-message="copyDebugInformation">
|
<div data-type="button-press" data-sync="copyDebugInformation" data-confirm-message="copyDebugInformation">
|
||||||
<div class="option-button trigger-button">
|
<div class="option-button trigger-button">
|
||||||
__MSG_copyDebugInformation__
|
__MSG_copyDebugInformation__
|
||||||
|
|
|
@ -29,6 +29,7 @@ interface SBConfig {
|
||||||
trackViewCount: boolean;
|
trackViewCount: boolean;
|
||||||
trackViewCountInPrivate: boolean;
|
trackViewCountInPrivate: boolean;
|
||||||
trackDownvotes: boolean;
|
trackDownvotes: boolean;
|
||||||
|
trackDownvotesInPrivate: boolean;
|
||||||
dontShowNotice: boolean;
|
dontShowNotice: boolean;
|
||||||
noticeVisibilityMode: NoticeVisbilityMode;
|
noticeVisibilityMode: NoticeVisbilityMode;
|
||||||
hideVideoPlayerControls: boolean;
|
hideVideoPlayerControls: boolean;
|
||||||
|
@ -290,6 +291,7 @@ const syncDefaults = {
|
||||||
trackViewCount: true,
|
trackViewCount: true,
|
||||||
trackViewCountInPrivate: true,
|
trackViewCountInPrivate: true,
|
||||||
trackDownvotes: true,
|
trackDownvotes: true,
|
||||||
|
trackDownvotesInPrivate: false,
|
||||||
dontShowNotice: false,
|
dontShowNotice: false,
|
||||||
noticeVisibilityMode: NoticeVisbilityMode.FadedForAutoSkip,
|
noticeVisibilityMode: NoticeVisbilityMode.FadedForAutoSkip,
|
||||||
hideVideoPlayerControls: false,
|
hideVideoPlayerControls: false,
|
||||||
|
|
|
@ -281,7 +281,8 @@ export default class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
async addHiddenSegment(videoID: VideoID, segmentUUID: string, hidden: SponsorHideType) {
|
async addHiddenSegment(videoID: VideoID, segmentUUID: string, hidden: SponsorHideType) {
|
||||||
if (chrome.extension.inIncognitoContext || !Config.config.trackDownvotes) return;
|
if ((chrome.extension.inIncognitoContext && !Config.config.trackDownvotesInPrivate)
|
||||||
|
|| !Config.config.trackDownvotes) return;
|
||||||
|
|
||||||
const hashedVideoID = (await getHash(videoID, 1)).slice(0, 4) as VideoID & HashedValue;
|
const hashedVideoID = (await getHash(videoID, 1)).slice(0, 4) as VideoID & HashedValue;
|
||||||
const UUIDHash = await getHash(segmentUUID, 1);
|
const UUIDHash = await getHash(segmentUUID, 1);
|
||||||
|
|
Loading…
Reference in a new issue