Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknyk committed Jan 15, 2021
1 parent 7be925d commit 4f7123c
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 6 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# <img src="media/Icon.png" width="45" align="left">&nbsp;Youtb

> Unofficial Youtube app
<br>
[![](media/screenshot.png)](https://github.com/sindresorhus/caprine/releases/latest)

*Requires OS X 10.8+ and Linux. Windows support planned.*

## Install

### Manually

[**Download**](https://github.com/eriknyk/youtb/releases/latest) the latest version for your platform. On OS X, unzip and move `youtb.app` to the `/Applications` directory.

On Linux, unzip to some location. To add a shortcut to the application, create a file in ``~/.local/share/applications`` called ``youtb.desktop`` with the following contents:

```
[Desktop Entry]
Name=youtb
Exec=/full/path/to/folder/youtb
Terminal=false
Type=Application
Icon=/full/path/to/folder/resources/app/media/Icon.png
```

## Dev

Built with [Electron](http://electron.atom.io).

###### Commands

- Init: `$ npm install`
- Run: `$ npm start`
- Build: `$ npm run build`


## License

MIT © [Erik Amaru Ortiz](http://github.com/eriknyk)
6 changes: 6 additions & 0 deletions browser.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
html, body {
-ms-overflow-style: scrollbar !important;
}
.ytd-app {
-webkit-app-region: drag !important;
}
.ytd-masthead {
padding-top: 4px !important;
}
1 change: 1 addition & 0 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
const ipc = require('electron-better-ipc').ipcRenderer;

ipc.answerMain('log-out', () => {
alert('ok')
document.location.href = 'https://www.youtube.com/logout';
});
Binary file added media/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "script.js",
"dependencies": {
"electron-better-ipc": "^1.1.1",
"electron-util": "^0.14.2"
Expand Down
13 changes: 8 additions & 5 deletions index.js → script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ function createWindow() {
width: 1024,
height: 768,
//icon: __dirname + '/media/icon.png',
titleBarStyle: 'hiddenInset',
titleBarStyle: 'hidden',
webPreferences:{
preload: path.join(__dirname, 'browser.js'),
nativeWindowOpen: true,
contextIsolation: true,
//nativeWindowOpen: true,
//contextIsolation: true,
// fails without this because of CommonJS script detection
nodeIntegration: false,
// required for Facebook active ping thingy
webSecurity: true,
plugins: true,
enableRemoteModule: false
enableRemoteModule: true
}
});
win.loadURL('https://youtube.com', {
Expand All @@ -34,7 +37,7 @@ function createWindow() {
app.on('ready', function () {
Menu.setApplicationMenu(appMenu);
mainWindow = createWindow();
//mainWindow.webContents.openDevTools();
mainWindow.webContents.openDevTools();

const page = mainWindow.webContents;

Expand Down

0 comments on commit 4f7123c

Please sign in to comment.