mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Update ContentScript.js
This commit is contained in:
@@ -13,14 +13,14 @@ function SponsorsLookup(id) {
|
|||||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||||
Sponsors = JSON.parse(xmlhttp.responseText);
|
Sponsors = JSON.parse(xmlhttp.responseText);
|
||||||
v.ontimeupdate = function () {
|
v.ontimeupdate = function () {
|
||||||
SponsorCheck()
|
SponsorCheck(Sponsors);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xmlhttp.send(null);
|
xmlhttp.send(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SponsorCheck() {
|
function SponsorCheck(Sponsors) {
|
||||||
Sponsors.forEach(function (el, index) {
|
Sponsors.forEach(function (el, index) {
|
||||||
if ((Math.floor(v.currentTime)) == el[0]) {
|
if ((Math.floor(v.currentTime)) == el[0]) {
|
||||||
v.currentTime = el[1];
|
v.currentTime = el[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user