diff --git a/README.md b/README.md index d14113dc..1b2157da 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ If there is no score they are refreshed once per day. If the movie is newer than | Intro | ✅ brooklyn nine nine S1E4| ✅ lucifer S3E4| ✅ star wars andor S1E2 | ✅ [One piece](https://www.crunchyroll.com/series/GRMG8ZQZR/one-piece) | ✅ | | Recaps | ✅ Outer Banks S2E1| ✅ lucifer S3E3 | ✅ Criminal Minds S1E2| ? | ✅ | | Credits | ✅ | ✅ | ✅ | ❌(not necessary if outro is skipped) | ✅ | -| Ads | ✅ | ✅ [2 Broke Girls](https://www.amazon.de/gp/video/detail/B01D0H8CAY/ref=atv_hm_fre_c_zwoINQ_2_2?jic=36%7CCgtmcmVld2l0aGFkcxIMc3Vic2NyaXB0aW9u) | ✅ | ❌(Ublock can do it) | ? | +| Ads | ✅ | ✅ | ✅ | ❌(Ublock can do it) | ? | | Add Speed Slider | ✅ | ✅ | ✅ | ✅ | ✅ | | Play on Fullscreen | ✅ | ✅ | ✅ | ✅ | ✅ | | fullscreen on double click | ➖ | ✅ | ➖ | ✅ | ? | diff --git a/chrome/_locales/de/messages.json b/chrome/_locales/de/messages.json index 2a44b9e2..8602a41c 100644 --- a/chrome/_locales/de/messages.json +++ b/chrome/_locales/de/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Wenn Sie auf dem Tonsymbol nach oben oder unten scrollen, wird die Lautstärke geändert." + }, + "DisneyAdDescription": { + "message": "Zeit der übersprungenen Disney-Werbung." } } \ No newline at end of file diff --git a/chrome/_locales/en/messages.json b/chrome/_locales/en/messages.json index e6fab532..5988a64b 100644 --- a/chrome/_locales/en/messages.json +++ b/chrome/_locales/en/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Scrolling up or down on the Sound Icon will change the volume." + }, + "DisneyAdDescription": { + "message": "Time of skipped Disney Ads." } } \ No newline at end of file diff --git a/chrome/_locales/es/messages.json b/chrome/_locales/es/messages.json index 5c19f27d..bad8a957 100644 --- a/chrome/_locales/es/messages.json +++ b/chrome/_locales/es/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Si se desplaza hacia arriba o hacia abajo en el icono de sonido, cambiará el volumen." + }, + "DisneyAdDescription": { + "message": "Tiempo de anuncios Disney saltados." } } \ No newline at end of file diff --git a/chrome/_locales/fr/messages.json b/chrome/_locales/fr/messages.json index 773b9b74..4aca17de 100644 --- a/chrome/_locales/fr/messages.json +++ b/chrome/_locales/fr/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Le défilement vers le haut ou vers le bas de l'icône du son modifie le volume." + }, + "DisneyAdDescription": { + "message": "Durée des publicités Disney sautées." } } \ No newline at end of file diff --git a/chrome/_locales/it/messages.json b/chrome/_locales/it/messages.json index 4581d17a..5979cdb5 100644 --- a/chrome/_locales/it/messages.json +++ b/chrome/_locales/it/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Lo scorrimento verso l'alto o verso il basso dell'icona del suono modifica il volume." + }, + "DisneyAdDescription": { + "message": "Tempo di salto degli annunci Disney." } } \ No newline at end of file diff --git a/chrome/_locales/ja/messages.json b/chrome/_locales/ja/messages.json index 55d51a06..9417ee45 100644 --- a/chrome/_locales/ja/messages.json +++ b/chrome/_locales/ja/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "サウンドアイコンを上下にスクロールすると音量が変わります。" + }, + "DisneyAdDescription": { + "message": "ディズニーの広告をスキップした時間。" } } \ No newline at end of file diff --git a/chrome/_locales/ko/messages.json b/chrome/_locales/ko/messages.json index 549a4afe..616219c9 100644 --- a/chrome/_locales/ko/messages.json +++ b/chrome/_locales/ko/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "사운드 아이콘을 위아래로 스크롤하면 볼륨이 변경됩니다." + }, + "DisneyAdDescription": { + "message": "디즈니 광고를 건너뛴 시간." } } \ No newline at end of file diff --git a/chrome/_locales/pl/messages.json b/chrome/_locales/pl/messages.json index c99131b1..ef954491 100644 --- a/chrome/_locales/pl/messages.json +++ b/chrome/_locales/pl/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Przewijanie ikony dźwięku w górę lub w dół powoduje zmianę głośności." + }, + "DisneyAdDescription": { + "message": "Czas pominiętych reklam Disneya." } } \ No newline at end of file diff --git a/chrome/_locales/pt/messages.json b/chrome/_locales/pt/messages.json index d5daa0ae..81e932db 100644 --- a/chrome/_locales/pt/messages.json +++ b/chrome/_locales/pt/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Deslocar-se para cima ou para baixo no ícone de som altera o volume." + }, + "DisneyAdDescription": { + "message": "Tempo de saltar anúncios da Disney." } } \ No newline at end of file diff --git a/chrome/_locales/pt_BR/messages.json b/chrome/_locales/pt_BR/messages.json index ac180e45..78a575d1 100644 --- a/chrome/_locales/pt_BR/messages.json +++ b/chrome/_locales/pt_BR/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Deslocar-se para cima ou para baixo no ícone de som altera o volume." + }, + "DisneyAdDescription": { + "message": "Tempo de saltar anúncios da Disney." } } \ No newline at end of file diff --git a/chrome/_locales/sv/messages.json b/chrome/_locales/sv/messages.json index 5c6203c0..3a5a80e7 100644 --- a/chrome/_locales/sv/messages.json +++ b/chrome/_locales/sv/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Om du bläddrar upp eller ner på ljudikonen ändras volymen." + }, + "DisneyAdDescription": { + "message": "Tid för överhoppade Disney-annonser." } } \ No newline at end of file diff --git a/chrome/_locales/tr/messages.json b/chrome/_locales/tr/messages.json index 690b7b14..c63a453a 100644 --- a/chrome/_locales/tr/messages.json +++ b/chrome/_locales/tr/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "Ses Simgesi üzerinde yukarı veya aşağı kaydırma yapmak ses seviyesini değiştirecektir." + }, + "DisneyAdDescription": { + "message": "Disney reklamlarını atlama zamanı." } } \ No newline at end of file diff --git a/chrome/_locales/zh_CN/messages.json b/chrome/_locales/zh_CN/messages.json index 9ca05363..7df0b583 100644 --- a/chrome/_locales/zh_CN/messages.json +++ b/chrome/_locales/zh_CN/messages.json @@ -302,5 +302,8 @@ }, "scrollVolumeDescription": { "message": "上下滚动声音图标可改变音量。" + }, + "DisneyAdDescription": { + "message": "跳过迪斯尼广告的时间" } } \ No newline at end of file diff --git a/chrome/cr.js b/chrome/cr.js index 21236dd7..43ad19f9 100644 --- a/chrome/cr.js +++ b/chrome/cr.js @@ -36,7 +36,7 @@ const defaultSettings = { profile: true, showRating: true, }, - Disney: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true, selfAd: true }, + Disney: { skipIntro: true, skipCredits: true, watchCredits: false, skipAd: true, speedSlider: true, showRating: true, selfAd: true }, Crunchyroll: { skipIntro: true, speedSlider: true, @@ -48,7 +48,14 @@ const defaultSettings = { }, HBO: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true }, Video: { playOnFullScreen: true, epilepsy: false, userAgent: true, doubleClick: true, scrollVolume: true }, - Statistics: { AmazonAdTimeSkipped: 0, NetflixAdTimeSkipped: 0, IntroTimeSkipped: 0, RecapTimeSkipped: 0, SegmentsSkipped: 0 }, + Statistics: { + AmazonAdTimeSkipped: 0, + NetflixAdTimeSkipped: 0, + DisneyAdTimeSkipped: 0, + IntroTimeSkipped: 0, + RecapTimeSkipped: 0, + SegmentsSkipped: 0, + }, General: { Crunchyroll_profilePicture: null, profileName: null, diff --git a/chrome/popup/popup.html b/chrome/popup/popup.html index 0a5551c0..7649575d 100644 --- a/chrome/popup/popup.html +++ b/chrome/popup/popup.html @@ -38,8 +38,7 @@

pageTitle

rateNow

- rating + rating
SkippedTime

StatisticAd;Netflix

0s

+
+

StatisticAd;Disney

+

0s

+

StatisticIntro

0s

diff --git a/chrome/popup/settings.html b/chrome/popup/settings.html index 9e444b0e..da996880 100644 --- a/chrome/popup/settings.html +++ b/chrome/popup/settings.html @@ -36,8 +36,7 @@

pageTitle

rateNow

- rating + rating

NetflixAdDescription


+
+

StatisticAd;Disney

+

0s

+
+

DisneyAdDescription

+

StatisticIntro

0s

@@ -726,6 +736,12 @@

Changelog

1.1.41

+
    +
  • Block Disney Ads
  • +
+
+
+

1.1.40

  • Netflix pause ad not getting removed when no video on screen
  • Change the volume if you scroll on the volume icon
  • diff --git a/chrome/popup/settings.js b/chrome/popup/settings.js index e73003a2..3ca2e29b 100644 --- a/chrome/popup/settings.js +++ b/chrome/popup/settings.js @@ -86,7 +86,7 @@ const defaultSettings = { profile: true, showRating: true, }, - Disney: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true, selfAd: true }, + Disney: { skipIntro: true, skipCredits: true, watchCredits: false, skipAd: true, speedSlider: true, showRating: true, selfAd: true }, Crunchyroll: { skipIntro: true, speedSlider: true, @@ -98,7 +98,14 @@ const defaultSettings = { }, HBO: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true }, Video: { playOnFullScreen: true, epilepsy: false, userAgent: true, doubleClick: true, scrollVolume: true }, - Statistics: { AmazonAdTimeSkipped: 0, NetflixAdTimeSkipped: 0, IntroTimeSkipped: 0, RecapTimeSkipped: 0, SegmentsSkipped: 0 }, + Statistics: { + AmazonAdTimeSkipped: 0, + NetflixAdTimeSkipped: 0, + DisneyAdTimeSkipped: 0, + IntroTimeSkipped: 0, + RecapTimeSkipped: 0, + SegmentsSkipped: 0, + }, General: { Crunchyroll_profilePicture: null, profileName: null, @@ -216,6 +223,7 @@ async function setCheckboxesToSettings() { // Ads settings?.Amazon.blockFreevee && settings?.Netflix.skipAd && + settings?.Disney.skipAd && getBooleanOfCategory("showRating") && getBooleanOfCategory("speedSlider") && // playOnFullScreen @@ -226,7 +234,7 @@ async function setCheckboxesToSettings() { VideoCheckboxes.forEach((key) => { setButtonChecked("Video" + capitalizeFirstLetter(key), getBooleanOfCategory(key)); }); - setButtonChecked("VideoAds", settings?.Amazon.blockFreevee && settings?.Netflix.skipAd); + setButtonChecked("VideoAds", settings?.Amazon.blockFreevee && settings?.Netflix.skipAd && settings?.Disney.skipAd); setButtonChecked("VideoFullScreen", settings?.Video.playOnFullScreen); setButtonChecked("VideoDoubleClick", settings?.Video.doubleClick); setButtonChecked("VideoScrollVolume", settings?.Video.scrollVolume); @@ -402,6 +410,7 @@ function listenForClicks() { // Ads settings?.Amazon.blockFreevee && settings?.Netflix.skipAd && + settings?.Disney.skipAd && getBooleanOfCategory("showRating") && getBooleanOfCategory("speedSlider") && // playOnFullScreen @@ -415,13 +424,17 @@ function listenForClicks() { }); settings.Amazon.blockFreevee = settings.Netflix.skipAd = + settings.Disney.skipAd = settings.Video.playOnFullScreen = settings.Video.doubleClick = settings.Video.scrollVolume = VideoSkips; if (VideoSkips) setCategoryToBoolean("watchCredits", false); } else if (e.target.id === "VideoAds") - settings.Amazon.blockFreevee = settings.Netflix.skipAd = !(settings?.Amazon.blockFreevee && settings?.Netflix.skipAd); + settings.Amazon.blockFreevee = + settings.Netflix.skipAd = + settings.Disney.skipAd = + !(settings?.Amazon.blockFreevee && settings?.Netflix.skipAd && settings?.Disney.skipAd); else if (e.target.id === "VideoFullScreen") settings.Video.playOnFullScreen = !settings.Video.playOnFullScreen; else if (e.target.id === "VideoDoubleClick") settings.Video.doubleClick = !settings.Video.doubleClick; else if (e.target.id === "VideoScrollVolume") settings.Video.scrollVolume = !settings.Video.scrollVolume; diff --git a/chrome/skipper.js b/chrome/skipper.js index 6739c909..132bea54 100644 --- a/chrome/skipper.js +++ b/chrome/skipper.js @@ -58,7 +58,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO profile: true, showRating: true, }, - Disney: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true, selfAd: true }, + Disney: { skipIntro: true, skipCredits: true, watchCredits: false, skipAd: true, speedSlider: true, showRating: true, selfAd: true }, Crunchyroll: { skipIntro: true, speedSlider: true, @@ -70,7 +70,14 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO }, HBO: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true }, Video: { playOnFullScreen: true, epilepsy: false, userAgent: true, doubleClick: true, scrollVolume: true }, - Statistics: { AmazonAdTimeSkipped: 0, NetflixAdTimeSkipped: 0, IntroTimeSkipped: 0, RecapTimeSkipped: 0, SegmentsSkipped: 0 }, + Statistics: { + AmazonAdTimeSkipped: 0, + NetflixAdTimeSkipped: 0, + DisneyAdTimeSkipped: 0, + IntroTimeSkipped: 0, + RecapTimeSkipped: 0, + SegmentsSkipped: 0, + }, General: { Crunchyroll_profilePicture: null, profileName: null, @@ -495,6 +502,23 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO if (settings.Disney?.selfAd) Disney_selfAd(video, time); } if (settings.Video?.scrollVolume) Disney_scrollVolume(video); + if (settings.Disney?.skipAd) Disney_skipAd(video); + } + async function Disney_skipAd(video) { + if (video) { + const adTimeText = document.querySelector("div.overlay_interstitials__content_time_display"); + if (adTimeText) { + const adTime = parseAdTime(adTimeText.textContent); + if (adTime >= 1 && !lastAdTimeText) { + lastAdTimeText = adTime; + resetLastATimeText(100); + video.currentTime += adTime; + log("Disney Ad skipped, length:", adTime, "s"); + settings.Statistics.DisneyAdTimeSkipped += adTime; + increaseBadge(); + } + } + } } async function Disney_scrollVolume(video) { const volumeControl = document.querySelector("div.audio-control:not(.enhanced)"); @@ -1066,7 +1090,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO }, 100); } function parseAdTime(adTimeText) { - const adTime = parseInt(/:\d+/.exec(adTimeText.textContent)?.[0].substring(1)) + parseInt(/\d+/.exec(adTimeText.textContent)?.[0]) * 60; + const adTime = parseInt(/:\d+/.exec(adTimeText)?.[0].substring(1)) + parseInt(/\d+/.exec(adTimeText)?.[0]) * 60; if (isNaN(adTime)) return false; return adTime; } @@ -1075,8 +1099,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO const adTimeText = document.querySelector(".atvwebplayersdk-ad-timer-text"); if (adTimeText) { let adTime; - adTime = parseAdTime(adTimeText?.childNodes?.[0]); - if (!adTime) adTime = parseAdTime(adTimeText?.childNodes?.[1]); + adTime = parseAdTime(adTimeText?.childNodes?.[0]?.textContent); + if (!adTime) adTime = parseAdTime(adTimeText?.childNodes?.[1]?.textContent); // !document.querySelector(".fu4rd6c.f1cw2swo") so it doesn't try to skip when the self ad is playing if (!document.querySelector(".fu4rd6c.f1cw2swo") && adTime > 1 && !lastAdTimeText) { lastAdTimeText = adTime;