Skip to content

Commit

Permalink
1.1.52
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Nov 21, 2024
1 parent f100637 commit 8a4c6e3
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion AuthorHours.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time":"501h37m14s"}
{"time":"504h38m11s"}
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.1.51",
"version": "1.1.52",

"homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion chrome/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" alt="Logo">
<div class="flex-center flex-col">
<h2 class="title" data-i18n>pageTitle</h2>
<p style="color: grey; font-size: 1em">v.1.1.51</p>
<p style="color: grey; font-size: 1em">v.1.1.52</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down
9 changes: 6 additions & 3 deletions chrome/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" alt="Logo">
<div class="flex-center flex-col">
<h2 class="title" data-i18n>pageTitle</h2>
<p style="font-size: 1em">v.1.1.51</p>
<p style="font-size: 1em">v.1.1.52</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down Expand Up @@ -735,13 +735,16 @@ <h2 data-i18n>ImportSettings</h2>
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.1.51</h2>
<h2>1.1.52</h2>
<ul>
<li>Disney improved ad skip</li>
<li>Disney fixed Bug first ad is not skipped</li>
<li>TMDB refresh new movie ratings every day</li>
<li>Netflix wrong TMDB ratings for movies with dash</li>
</ul>
</div>
<div class="line flex">
<h2>1.1.51</h2>
<p>1.1.51</p>
<ul>
<li>implemented GarbageCollection for DBcache, which deletes ratings older than 30 days</li>
</ul>
Expand Down
30 changes: 17 additions & 13 deletions chrome/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const isEdge = /edg/i.test(ua);
const htmlLang = document.documentElement.lang;
const date = new Date();
const today = date.toISOString().split("T")[0];
const version = "1.1.51";
const version = "1.1.52";
if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) {
/* eslint-env root:true */
// global variables in localStorage
Expand Down Expand Up @@ -205,6 +205,10 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
else if (isDisney || isHotstar) {
if (isHotstar) Hotstar_doubleClick();
DisneyObserver.observe(document, config);
setInterval(function () {
let video = Array.from(document.querySelectorAll("video")).find((v) => v.checkVisibility());
if (settings.Disney?.skipAd) Disney_skipAd(video);
}, 300);
} else if (isCrunchyroll) startCrunchyroll(settings.Crunchyroll);
else if (isHBO) HBOObserver.observe(document, config);
if (settings?.Video?.playOnFullScreen) startPlayOnFullScreen();
Expand Down Expand Up @@ -370,8 +374,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
const diffInReleaseDate =
// vote count is under 80 inaccurate rating
vote_count < 100 &&
// did not refresh rating in the last 2 days
getDiffInDays(DBCache[title].date, date) > 2 &&
// did not refresh rating in the last 0 days
getDiffInDays(DBCache[title].date, date) > 0 &&
// release date is in the last 50 days after not many people will
getDiffInDays(DBCache[title]?.release_date, date) <= 50;

Expand Down Expand Up @@ -579,8 +583,8 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
// Disney Observers
const DisneyObserver = new MutationObserver(Disney);
function Disney() {
let video = document.querySelector("video");
if (!video) video = document.querySelector("disney-web-player")?.shadowRoot?.firstChild?.firstChild;
// first ad not first video
let video = Array.from(document.querySelectorAll("video")).find((v) => v.checkVisibility());
const time = video?.currentTime;
if (settings.Disney?.skipIntro) Disney_Intro(video, time);
Disney_skipCredits(time);
Expand All @@ -591,22 +595,22 @@ 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);
if (adTime >= 1 && lastAdTimeText != video.currentTime) {
if (lastAdTimeText == 0) {
log("Disney Ad skipped, length:", adTime, "s");
settings.Statistics.DisneyAdTimeSkipped += adTime;
increaseBadge();
}
lastAdTimeText = video.currentTime;
video.currentTime += adTime;
log("Disney Ad skipped, length:", adTime, "s");
settings.Statistics.DisneyAdTimeSkipped += adTime;
increaseBadge();
}
}
} else lastAdTimeText = 0;
// remove das video wird nach der pause fortgesetzt text after skipping ad
const continueText = document.querySelector("p.toast-notification__text[aria-hidden='true']");
if (continueText?.checkVisibility()) {
Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.1.51",
"version": "1.1.52",
"homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip",
"icons": {
"16": "icons/NetflixAmazon Auto-Skip.svg",
Expand Down
2 changes: 1 addition & 1 deletion firefox/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" alt="Logo">
<div class="flex-center flex-col">
<h2 class="title" data-i18n>pageTitle</h2>
<p style="color: grey; font-size: 1em">v.1.1.51</p>
<p style="color: grey; font-size: 1em">v.1.1.52</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down
7 changes: 1 addition & 6 deletions firefox/popup/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<img class="Logo" src="../icons/NetflixAmazon Auto-Skip.svg" alt="Logo">
<div class="flex-center flex-col">
<h2 class="title" data-i18n>pageTitle</h2>
<p style="font-size: 1em">v.1.1.51</p>
<p style="font-size: 1em">v.1.1.52</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down Expand Up @@ -740,11 +740,6 @@ <h2>1.1.52</h2>
<li>Disney improved ad skip</li>
<li>Disney fixed Bug first ad is not skipped</li>
<li>TMDB refresh new movie ratings every day</li>
</ul>
</div>
<div class="line flex">
<p>1.1.51</p>
<ul>
<li>Netflix wrong TMDB ratings for movies with dash</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion firefox/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const isEdge = /edg/i.test(ua);
const htmlLang = document.documentElement.lang;
const date = new Date();
const today = date.toISOString().split("T")[0];
const version = "1.1.51";
const version = "1.1.52";
if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) {
/* eslint-env root:true */
// global variables in localStorage
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "streaming-enhanced",
"version": "1.1.51",
"version": "1.1.52",
"description": "Automatically skip Ads, Intros, Credits and add Speed Control, etc. on Netflix, Prime video, Disney+ & Hotstar and Crunchyroll.",
"scripts": {
"start": "web-ext run --keep-profile-changes --firefox-profile=test --profile-create-if-missing",
Expand Down

0 comments on commit 8a4c6e3

Please sign in to comment.