mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 22:47:18 +03:00
Merge pull request #142 from omarroth/fields-api
Only request published field from Invidious API
This commit is contained in:
@@ -376,7 +376,7 @@ function sponsorsLookup(id) {
|
|||||||
|
|
||||||
//check if this video was uploaded recently
|
//check if this video was uploaded recently
|
||||||
//use the invidious api to get the time published
|
//use the invidious api to get the time published
|
||||||
sendRequestToCustomServer('GET', "https://invidio.us/api/v1/videos/" + id, function(xmlhttp, error) {
|
sendRequestToCustomServer('GET', "https://invidio.us/api/v1/videos/" + id + '?fields=published', function(xmlhttp, error) {
|
||||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||||
let unixTimePublished = JSON.parse(xmlhttp.responseText).published;
|
let unixTimePublished = JSON.parse(xmlhttp.responseText).published;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user