diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5c73250
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+# Youtb
+
+> Unofficial Youtube app
+
+
+[![](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)
\ No newline at end of file
diff --git a/browser.css b/browser.css
index 361cd93..857ddc1 100644
--- a/browser.css
+++ b/browser.css
@@ -1,3 +1,9 @@
+html, body {
+ -ms-overflow-style: scrollbar !important;
+}
+.ytd-app {
+ -webkit-app-region: drag !important;
+}
.ytd-masthead {
padding-top: 4px !important;
}
\ No newline at end of file
diff --git a/browser.js b/browser.js
index 056adfb..95e9d03 100644
--- a/browser.js
+++ b/browser.js
@@ -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';
});
\ No newline at end of file
diff --git a/media/screenshot.png b/media/screenshot.png
new file mode 100644
index 0000000..32b6a25
Binary files /dev/null and b/media/screenshot.png differ
diff --git a/package.json b/package.json
index f4e3991..042284c 100644
--- a/package.json
+++ b/package.json
@@ -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"
diff --git a/index.js b/script.js
similarity index 78%
rename from index.js
rename to script.js
index 0bdfccd..3a8e8a8 100644
--- a/index.js
+++ b/script.js
@@ -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', {
@@ -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;