File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -193,14 +193,17 @@ player.on('timeupdate', function () {
193193 elem_iv_other . href = addCurrentTimeToURL ( base_url_iv_other , domain ) ;
194194 }
195195
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+
196202 // Only increase time watched when the time difference is one second and the video has not been marked as watched
197203 const isOneSecondDifference = current_ts - last_player_time === 1 ;
198204 const exceedsMarkWatchedAfterDuration = time_watched > MARK_WATCHED_AFTER_DURATION ;
199205
200- const $markWatchedAfterDuration = document . getElementById ( `${ STORAGE_MARK_WATCHED_AFTER_DURATION } _pref` ) ;
201- const markWatchedAfterDuration = $markWatchedAfterDuration ?. innerText === "true" ;
202-
203- if ( ! isOneSecondDifference || exceedsMarkWatchedAfterDuration || markWatchedAfterDuration === false ) return ;
206+ if ( ! isOneSecondDifference || exceedsMarkWatchedAfterDuration ) return ;
204207
205208 time_watched += 1 ;
206209
You can’t perform that action at this time.
0 commit comments