Skip to content

Commit

Permalink
Remove advertisement
Browse files Browse the repository at this point in the history
it will be added in futrher updates.
  • Loading branch information
fishuke authored Feb 3, 2021
1 parent fd90608 commit ef2bfd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ytmparty-plugin/src/content-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ class ContentScript {
}
break;
case 'loadedmetadata':
this.listenMediaSessionEvents();
// this.listenMediaSessionEvents();
// @ts-ignore
if (navigator.mediaSession.metadata.artwork[0].src.includes('https://i.ytimg.com/')) {
chrome.runtime.sendMessage(this.extensionId, {event: 'advertisement'});
} else {
// if (navigator.mediaSession.metadata.artwork[0].src.includes('https://i.ytimg.com/')) {
// chrome.runtime.sendMessage(this.extensionId, {event: 'advertisement'});
// } else {
this.listenMediaSessionEvents();
chrome.runtime.sendMessage(this.extensionId, {
event: 'nextTrack',
url: window.location.href.split('&')[0],
duration: this.video.duration
});
}
// }
break;
}
});
Expand Down

0 comments on commit ef2bfd0

Please sign in to comment.