mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-29 05:40:52 +03:00
Removed the need for getYouTubeVideoStartTime and made it check the current video time instead.
This commit is contained in:
13
utils.js
13
utils.js
@@ -23,15 +23,4 @@ function getYouTubeVideoID(url) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//returns the start time of the video if there was one specified (ex. ?t=5s)
|
||||
function getYouTubeVideoStartTime(url) {
|
||||
let searchParams = new URL(url).searchParams;
|
||||
let startTime = searchParams.get("t");
|
||||
if (startTime == null) {
|
||||
startTime = searchParams.get("time_continue");
|
||||
}
|
||||
|
||||
return startTime;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user