mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Fixed Firefox notification issue
This commit is contained in:
@@ -3,6 +3,9 @@ var previousVideoID = null
|
|||||||
//the id of this user, randomly generated once per install
|
//the id of this user, randomly generated once per install
|
||||||
var userID = null;
|
var userID = null;
|
||||||
|
|
||||||
|
//the last video id loaded, to make sure it is a video id change
|
||||||
|
var sponsorVideoID = null;
|
||||||
|
|
||||||
//when a new tab is highlighted
|
//when a new tab is highlighted
|
||||||
chrome.tabs.onActivated.addListener(
|
chrome.tabs.onActivated.addListener(
|
||||||
function(activeInfo) {
|
function(activeInfo) {
|
||||||
@@ -162,6 +165,12 @@ function videoIDChange(currentVideoID, tabId) {
|
|||||||
id: currentVideoID
|
id: currentVideoID
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//not a url change
|
||||||
|
if (sponsorVideoID == currentVideoID){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sponsorVideoID = currentVideoID;
|
||||||
|
|
||||||
//warn them if they had unsubmitted times
|
//warn them if they had unsubmitted times
|
||||||
if (previousVideoID != null) {
|
if (previousVideoID != null) {
|
||||||
//get the sponsor times from storage
|
//get the sponsor times from storage
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "SponsorBlock for YouTube - Skip Sponsorships",
|
"name": "SponsorBlock for YouTube - Skip Sponsorships",
|
||||||
"short_name": "SponsorBlock",
|
"short_name": "SponsorBlock",
|
||||||
"version": "1.0.18",
|
"version": "1.0.19",
|
||||||
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
|
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user