Skip to content

Commit

Permalink
1.1.30
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Aug 24, 2024
1 parent 3d7effa commit 7fd642e
Show file tree
Hide file tree
Showing 15 changed files with 441 additions and 280 deletions.
18 changes: 12 additions & 6 deletions chrome/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@
"WatchCreditsSwitchDescription": {
"message": "Sich immer den Abspann jeder Serie ansehen"
},
"gotoIndividual": {
"message": "Für die individuellen Streaming-Dienst Einstellungen gehen Sie auf die "
},
"extendedSettings": {
"message": "erweiterte Einstellungen"
},
"conflictingTitle": {
"message": "Alle widersprüchlichen Funktionen"
},
Expand Down Expand Up @@ -299,5 +293,17 @@
},
"BigPlayerDescription": {
"message": "Erweitert die größe des Videos zum gesamten Browserfenster ohne Vollbild."
},
"DisableNumpadSwitch": {
"message": "Ziffernblock deaktivieren:"
},
"DisableNumpadDescription": {
"message": "Deaktivieren Sie die Zifferntasten, damit nicht versehentlich die aktuelle Videozeit /-position geändert wird."
},
"DoubleClickSwitch": {
"message": "Vollbildmodus bei Doppelklick:"
},
"DoubleClickSwitchDescription": {
"message": "Wenn Sie auf das Video doppelklicken, wird es im Vollbildmodus angezeigt."
}
}
21 changes: 13 additions & 8 deletions chrome/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@
"message": "Slider preview:"
},
"FullscreenSwitch": {
"message": "Play on Fullscreen:"
"message": "Play on fullscreen:"
},
"FullscreenSwitchDescription": {
"message": "If a video is put on fullscreen, the video will play automatically"
},

"SelfAdsSwitch": {
"message": "Skip Self Ads:"
},
Expand Down Expand Up @@ -223,12 +222,6 @@
"WatchCreditsSwitchDescription": {
"message": "Always watch the credits of every series"
},
"gotoIndividual": {
"message": "For the individual settings of the streaming services go to the "
},
"extendedSettings": {
"message": "extended Settings"
},
"conflictingTitle": {
"message": "All conflicting Features"
},
Expand Down Expand Up @@ -299,5 +292,17 @@
},
"BigPlayerDescription": {
"message": "Extends the video size to the entire chrome window without full screen."
},
"DisableNumpadSwitch": {
"message": "Disable numpad:"
},
"DisableNumpadDescription": {
"message": "Disable the numpad keys so you don't accidentally change the current video time/position."
},
"DoubleClickSwitch": {
"message": "Fullscreen on double click:"
},
"DoubleClickSwitchDescription": {
"message": "If you double click on the video it will go to fullscreen."
}
}
20 changes: 10 additions & 10 deletions chrome/_locales/mk/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@
"WatchCreditsSwitchDescription": {
"message": "Секогаш гледај ги завршните наслови на секоја серија"
},
"gotoIndividual": {
"message": "За индивидуалните поставки на услугата за стриминг, одете на "
},
"extendedSettings": {
"message": "напредни поставки"
},
"conflictingTitle": {
"message": "Сите конфликтни функции"
},
Expand Down Expand Up @@ -285,10 +279,16 @@
"message": "Дома",
"description": "Disney Homepage button"
},
"BigPlayerSwitch": {
"message": "Видео поголемо:"
"DisableNumpadSwitch": {
"message": "Оневозможи numpad:"
},
"DisableNumpadDescription": {
"message": "Оневозможете ги копчињата со нумпод за случајно да не го промените тековното време/положба на видеото."
},
"DoubleClickSwitch": {
"message": "Цел екран со двоен клик:"
},
"BigPlayerDescription": {
"message": "Ја проширува големината на видеото на целиот прозорец на прелистувачот без цел екран."
"DoubleClickSwitchDescription": {
"message": "Ако кликнете двапати на видеото, тоа ќе оди на цел екран."
}
}
18 changes: 12 additions & 6 deletions chrome/_locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@
"WatchCreditsSwitchDescription": {
"message": "Sempre assistir aos créditos de todas as séries"
},
"gotoIndividual": {
"message": "Para obter as configurações individuais dos serviços de streaming, vá para a seção "
},
"extendedSettings": {
"message": "Configurações extendidas"
},
"conflictingTitle": {
"message": "Todos os recursos conflitantes"
},
Expand Down Expand Up @@ -296,5 +290,17 @@
},
"BigPlayerDescription": {
"message": "Estende o tamanho do vídeo para toda a janela do navegador sem tela cheia."
},
"DisableNumpadSwitch": {
"message": "Desativar o teclado numérico:"
},
"DisableNumpadDescription": {
"message": "Desative as teclas do teclado numérico para não alterar acidentalmente o tempo/posição do vídeo atual."
},
"DoubleClickSwitch": {
"message": "Tela cheia ao clicar duas vezes:"
},
"DoubleClickSwitchDescription": {
"message": "Se você clicar duas vezes no vídeo, ele será exibido em tela cheia."
}
}
55 changes: 43 additions & 12 deletions chrome/cr.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ const defaultSettings = {
showRating: true,
},
Disney: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true, selfAd: true },
Crunchyroll: { skipIntro: true, speedSlider: true, releaseCalendar: true, dubLanguage: null, profile: true, bigPlayer: true },
Crunchyroll: {
skipIntro: true,
speedSlider: true,
releaseCalendar: true,
dubLanguage: null,
profile: true,
bigPlayer: true,
disableNumpad: true,
},
HBO: { skipIntro: true, skipCredits: true, watchCredits: false, speedSlider: true, showRating: true },
Video: { playOnFullScreen: true, epilepsy: false, userAgent: true },
Video: { playOnFullScreen: true, epilepsy: false, userAgent: true, doubleClick: true },
Statistics: { AmazonAdTimeSkipped: 0, NetflixAdTimeSkipped: 0, IntroTimeSkipped: 0, RecapTimeSkipped: 0, SegmentsSkipped: 0 },
General: {
Crunchyroll_profilePicture: null,
Expand All @@ -55,16 +63,7 @@ const defaultSettings = {
},
};
let settings = { ...defaultSettings.settings };
const version = "1.1.29";
chrome.storage.sync.get("settings", function (result) {
console.log(
"%cNetflix%c/%cPrime%c Auto-Skip",
"color: #e60010;font-size: 2em;",
"color: white;font-size: 2em;",
"color: #00aeef;font-size: 2em;",
"color: white;font-size: 2em;"
);
console.log("version:", version);
// overwrite default settings with user settings
// List of keys to merge individually
settings.Amazon = { ...defaultSettings.settings.Amazon, ...result?.settings?.Amazon };
Expand All @@ -75,7 +74,8 @@ chrome.storage.sync.get("settings", function (result) {
settings.Video = { ...defaultSettings.settings.Video, ...result?.settings?.Video };
settings.Statistics = { ...defaultSettings.settings.Statistics, ...result?.settings?.Statistics };
settings.General = { ...defaultSettings.settings.General, ...result?.settings?.General };

if (settings?.Crunchyroll?.disableNumpad) Crunchyroll_disableNumpad();
if (settings?.Video?.doubleClick) startdoubleClick();
CrunchyrollObserver.observe(document, config);
if (settings?.Video?.playOnFullScreen) startPlayOnFullScreen();
});
Expand Down Expand Up @@ -273,6 +273,37 @@ async function Crunchyroll_SpeedSlider(video) {
}
}
}
async function Crunchyroll_disableNumpad() {
addEventListener(
"keydown",
async function (event) {
if (event.location === 3) {
console.log("key blocked: " + event.key);
event.stopPropagation();
increaseBadge();
}
},
true
);
}
async function startdoubleClick() {
if (settings.Video?.doubleClick) {
// event listener for double click
document.ondblclick = function () {
let video = document.querySelector("video");
if (video) {
// video is fullscreen
if (window.fullScreen) {
document.exitFullscreen();
} else {
document.body.requestFullscreen();
}
}
};
} else {
document.ondblclick = null;
}
}
// Badge Functions
function increaseBadge() {
settings.Statistics.SegmentsSkipped++;
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.29",
"version": "1.1.30",

"homepage_url": "https://github.com/Dreamlinerm/Netflix-Prime-Auto-Skip",
"icons": {
Expand Down
Loading

0 comments on commit 7fd642e

Please sign in to comment.