mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Update ContentScript.js
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
var v = document.querySelector('video')
|
chrome.runtime.onMessage.addListener(
|
||||||
|
function(request, sender, sendResponse) {
|
||||||
|
if (request.message === 'ytvideo') {
|
||||||
video_id = youtube_parser(document.URL);
|
video_id = youtube_parser(document.URL);
|
||||||
|
|
||||||
if (video_id) {
|
|
||||||
SponsorsLookup(video_id);
|
SponsorsLookup(video_id);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function SponsorsLookup(id) {
|
function SponsorsLookup(id) {
|
||||||
|
v = document.querySelector('video')
|
||||||
var xmlhttp = new XMLHttpRequest();
|
var xmlhttp = new XMLHttpRequest();
|
||||||
xmlhttp.open('GET', 'https://officialnoob.github.io/YTSponsorSkip-Dataset/' + id, true);
|
xmlhttp.open('GET', 'https://officialnoob.github.io/YTSponsorSkip-Dataset/' + id, true);
|
||||||
xmlhttp.onreadystatechange = function () {
|
xmlhttp.onreadystatechange = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user