Skip to content

Commit

Permalink
version 1.1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Jul 5, 2024
1 parent 8ddb24c commit dabc558
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 48 deletions.
16 changes: 10 additions & 6 deletions chrome/cr.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const defaultSettings = {
},
};
let settings = { ...defaultSettings.settings };
const version = "1.1.19";
const version = "1.1.20";
chrome.storage.sync.get("settings", function (result) {
console.log(
"%cNetflix%c/%cPrime%c Auto-Skip",
Expand All @@ -67,11 +67,15 @@ chrome.storage.sync.get("settings", function (result) {
console.log("version:", version);
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

CrunchyrollObserver.observe(document, config);
if (settings?.Video?.playOnFullScreen) startPlayOnFullScreen();
});
Expand Down
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.19",
"version": "1.1.20",

"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.19</p>
<p style="color: grey; font-size: 1em">v.1.1.20</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down
10 changes: 8 additions & 2 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.19</p>
<p style="font-size: 1em">v.1.1.20</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down Expand Up @@ -681,7 +681,13 @@ <h2 data-i18n>ImportSettings</h2>
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.1.18-19</h2>
<h2>1.1.20</h2>
<ul>
<li>Fixed settings error</li>
</ul>
</div>
<div class="line flex">
<p>1.1.18-19</p>
<ul>
<li>Profile Pick not working
the same in deployed version</li>
Expand Down
14 changes: 9 additions & 5 deletions chrome/popup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ let settings = { ...defaultSettings.settings };
chrome.storage.sync.get("settings", function (result) {
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

// delete every setting that is not in defaultSettings
let changedSettings;
for (const key in settings) {
Expand Down
17 changes: 11 additions & 6 deletions chrome/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const isMobile = /mobile|streamingEnhanced/i.test(ua);
const isEdge = /edg/i.test(ua);
// const isFirefox = /firefox/i.test(ua);
// const isChrome = /chrome/i.test(ua);
const version = "1.1.19";
const version = "1.1.20";
if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) {
/* eslint-env root:true */
// global variables in localStorage
Expand Down Expand Up @@ -149,11 +149,15 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
chrome.storage.sync.get("settings", function (result) {
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

logStartOfAddon();
getDBCache();

Expand Down Expand Up @@ -786,6 +790,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
}
function Amazon_Intro() {
if (settings.Amazon?.skipIntro) {
console.log("Amazon_Intro");
// skips intro and recap
// recap on lucifer season 3 episode 3
// intro lucifer season 3 episode 4
Expand Down
14 changes: 9 additions & 5 deletions firefox/badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ if (isMobile) {
browser.storage.sync.get("settings", function (result) {
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

ChangeUserAgent();
console.log("userAgent", settings.Video.userAgent);
});
Expand Down
16 changes: 10 additions & 6 deletions firefox/cr.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const defaultSettings = {
},
};
let settings = { ...defaultSettings.settings };
const version = "1.1.19";
const version = "1.1.20";
browser.storage.sync.get("settings", function (result) {
console.log(
"%cNetflix%c/%cPrime%c Auto-Skip",
Expand All @@ -67,11 +67,15 @@ browser.storage.sync.get("settings", function (result) {
console.log("version:", version);
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

CrunchyrollObserver.observe(document, config);
if (settings?.Video?.playOnFullScreen) startPlayOnFullScreen();
});
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.19",
"version": "1.1.20",
"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.19</p>
<p style="color: grey; font-size: 1em">v.1.1.20</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down
10 changes: 8 additions & 2 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.19</p>
<p style="font-size: 1em">v.1.1.20</p>
</div>
</div>
<a target="_blank" class="flex-center flex-col" style="text-align: center; text-decoration: none"
Expand Down Expand Up @@ -681,7 +681,13 @@ <h2 data-i18n>ImportSettings</h2>
<h2>Changelog</h2>
<div>
<div class="line flex">
<h2>1.1.18-19</h2>
<h2>1.1.20</h2>
<ul>
<li>Fixed settings error</li>
</ul>
</div>
<div class="line flex">
<p>1.1.18-19</p>
<ul>
<li>Profile Pick not working
the same in deployed version</li>
Expand Down
14 changes: 9 additions & 5 deletions firefox/popup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ let settings = { ...defaultSettings.settings };
browser.storage.sync.get("settings", function (result) {
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

// delete every setting that is not in defaultSettings
let changedSettings;
for (const key in settings) {
Expand Down
17 changes: 11 additions & 6 deletions firefox/skipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const isMobile = /mobile|streamingEnhanced/i.test(ua);
const isEdge = /edg/i.test(ua);
// const isFirefox = /firefox/i.test(ua);
// const isChrome = /chrome/i.test(ua);
const version = "1.1.19";
const version = "1.1.20";
if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO) {
/* eslint-env root:true */
// global variables in localStorage
Expand Down Expand Up @@ -149,11 +149,15 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
browser.storage.sync.get("settings", function (result) {
// overwrite default settings with user settings
// List of keys to merge individually
Object.keys(defaultSettings.settings).forEach((key) => {
if (result?.settings[key]) {
settings[key] = { ...defaultSettings.settings[key], ...result.settings[key] };
}
});
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
settings.Netflix = { ...defaultSettings.settings.Netflix, ...result?.settings?.Netflix };
settings.Disney = { ...defaultSettings.settings.Disney, ...result?.settings?.Disney };
settings.Crunchyroll = { ...defaultSettings.settings.Crunchyroll, ...result?.settings?.Crunchyroll };
settings.HBO = { ...defaultSettings.settings.HBO, ...result?.settings?.HBO };
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

logStartOfAddon();
getDBCache();

Expand Down Expand Up @@ -786,6 +790,7 @@ if (isPrimeVideo || isNetflix || isDisney || isHotstar || isCrunchyroll || isHBO
}
function Amazon_Intro() {
if (settings.Amazon?.skipIntro) {
console.log("Amazon_Intro");
// skips intro and recap
// recap on lucifer season 3 episode 3
// intro lucifer season 3 episode 4
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.19",
"version": "1.1.20",
"description": "Automatically skip Ads, Intros, Credits and add Speed Control, etc. on Netflix, Prime video, Disney+ & Hotstar and Crunchyroll.",
"scripts": {
"start": "web-ext run",
Expand Down

0 comments on commit dabc558

Please sign in to comment.