-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
package-lock.json | ||
package.json | ||
dist | ||
icon.ico | ||
icon.png | ||
largeImage.png | ||
discord-rpc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const { app, BrowserWindow } = require('electron') | ||
const path = require('path') | ||
const client = require('./discord-rpc'); | ||
|
||
function createWindow () { | ||
// Crie uma janela do navegador. | ||
let win = new BrowserWindow({ | ||
width: 1920, | ||
height: 1080, | ||
fullscreen: true, | ||
autoHideMenuBar: true, | ||
title: 'MarTV | Melhor Site para assistir Filmes, Séries e Canais de TV', | ||
icon: 'icon.png' | ||
}) | ||
|
||
win.webContents.on('did-finish-load', () => { | ||
let pageTitle = win.webContents.getTitle() | ||
win.setTitle(pageTitle) | ||
}) | ||
|
||
// Entrar no modo de tela cheia | ||
win.setFullScreen(true) | ||
|
||
// Sair do modo de tela cheia | ||
win.setFullScreen(false) | ||
|
||
// Verificar se a janela está em modo de tela cheia | ||
if (win.isFullScreen()) { | ||
console.log('A janela está em modo de tela cheia!') | ||
} | ||
|
||
// Carregue o site MarTV no webview. | ||
win.loadURL('https://martv.marstore.repl.co/home/') | ||
|
||
// Abre as DevTools (Ferramentas do Desenvolvedor). | ||
// win.webContents.openDevTools() | ||
} | ||
|
||
|
||
|
||
// Evento "ready" é acionado quando o Electron termina de inicializar e está pronto para criar janelas do navegador. | ||
app.whenReady().then(createWindow) |