Skip to content

Commit

Permalink
Full screen state persistence functionality, cursor, size and window …
Browse files Browse the repository at this point in the history
…position of the main renderer. Resolves #35
  • Loading branch information
marcosrg9 committed Nov 21, 2022
1 parent 7601309 commit 0956b12
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 80 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "youtube-tv-electron",
"productName": "YouTube TV",
"version": "2.3.4",
"version": "2.4.0",
"description": "Cliente de YouTube TV sencillo para escritorio basado en electron.",
"main": "main.js",
"scripts": {
Expand Down
20 changes: 17 additions & 3 deletions renderers/main/injection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
console.log('Archivo de customización cargado... Esperando evento de carga.');

// Mensajes de estado.
const msgDB = {
es: {
Expand Down Expand Up @@ -161,7 +159,16 @@ const loadConnectionEvents = () => {

}

console.warn('Inyectando parches');
const listenLocalStorageQueries = () => {

window.ipc.on('localStorageQuery', (event, { type, data }) => {

const inf = window.localStorage.getItem(data);
event.sender.send('localStorageQueryResponse', inf);

})

}

// Carga la anulación de eventos de cambios de visibilidad.
visibilityChangeOverriding();
Expand All @@ -174,3 +181,10 @@ loadConnectionWarnings();

// Carga los eventos de cambio de conexión con el servidor de YouTube TV.
loadConnectionEvents();

// Escucha las peticiones de consultas al localStorage.
listenLocalStorageQueries();

// Indica al proceso principal que el código se ha cargado.

console.log('JavaScript enhancements loaded at', new Date(Date.now()).toISOString());
Loading

0 comments on commit 0956b12

Please sign in to comment.