Skip to content

Commit d999c50

Browse files
committed
refactor: remove redundant preference feature check
1 parent edc7268 commit d999c50

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

assets/js/player.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
var player_data = JSON.parse(document.getElementById('player_data').textContent);
33
var video_data = JSON.parse(document.getElementById('video_data').textContent);
44

5-
const STORAGE_MARK_WATCHED_AFTER_DURATION = "mark_watched_after_duration";
6-
75
var options = {
86
liveui: true,
97
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0],
@@ -193,12 +191,6 @@ player.on('timeupdate', function () {
193191
elem_iv_other.href = addCurrentTimeToURL(base_url_iv_other, domain);
194192
}
195193

196-
// Check if the feature is enabled
197-
const $markWatchedAfterDuration = document.getElementById(`${STORAGE_MARK_WATCHED_AFTER_DURATION}_pref`);
198-
const markWatchedAfterDuration = $markWatchedAfterDuration?.innerText === "true";
199-
200-
if (!markWatchedAfterDuration) return;
201-
202194
// Only increase time watched when the time difference is one second and the video has not been marked as watched
203195
const isOneSecondDifference = current_ts - last_player_time === 1;
204196
const exceedsMarkWatchedAfterDuration = time_watched > MARK_WATCHED_AFTER_DURATION;

0 commit comments

Comments
 (0)