Skip to content

Commit

Permalink
Merge pull request #26 from edanchenkov/feature/analytics
Browse files Browse the repository at this point in the history
Feature/analytics
  • Loading branch information
edanchenkov authored Nov 28, 2021
2 parents e4a7767 + e90b296 commit e1fea37
Show file tree
Hide file tree
Showing 15 changed files with 9,106 additions and 11,766 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# ![image](./arts/logo-45.png) MenuTube for macOS


[Download](https://github.com/edanchenkov/MenuTube/releases) | [Website](http://menutube.rednuclearmonkey.com/) | [Red Nuclear Monkey](https://rednuclearmonkey.com/)



![image](./arts/media.jpg)

Do you enjoy listening to YouTube's podcasts, audiobooks, interviews or anything else that doesn't require to focus on video? If yes, then MenuTube is for you! Put entire full functional YouTube website into your macOs's menu bar.

Features:
- Browse mobile YouTube version
- Watch or listen to bazillion hours of content
- Control media playback using keys on your keyboard!
- Intuitive and simple UI
- And more

Features:

- Browse mobile YouTube version
- Watch or listen to bazillion hours of content
- Control media playback using keys on your keyboard!
- Intuitive and simple UI
- And more

# Installation

Expand Down
137 changes: 68 additions & 69 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
var Config = require('electron-config');
var Config = require("electron-config");

var instance,
path = '';
path = "";

if (typeof __dirname !== 'undefined') {
path = __dirname;
if (typeof __dirname !== "undefined") {
path = __dirname;
}



// PATH TO CONFIG:
// /Users/<name>/Library/Application\ Support/MenuTube/

Expand All @@ -18,82 +16,83 @@ if (typeof __dirname !== 'undefined') {
* NOT VALID ANYMORE - NO LOCAL SETTINGS NO PREFERENCES PAGE!
* */
var userPreferences = {
adBlock: false,

alwaysOnTop : true,
windowResize : true,
windowDraggable : true,
windowPosition : 'trayCenter',
globalShortcuts : true,
PIPModeByDefault : false,
highlightTray : true,
rememberBounds : true,
theme : 'red-theme',
desktopMode : false,
adBlock: false,

alwaysOnTop: true,
windowResize: true,
windowDraggable: true,
windowPosition: "trayCenter",
globalShortcuts: true,
PIPModeByDefault: false,
highlightTray: true,
rememberBounds: true,
theme: "red-theme",
desktopMode: false,
};

var defaults = {
showOnRightClick: false,
userAgent: 'MMozilla/5.0 (Linux; Android 9; SM-G960F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Mobile Safari/537.36',
desktopUserAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36',
externalLinks: false,
icon: path + '/icons/logo-icon-black-and-white/icon.iconset/icon_16x16.png',
iconPressed: path + '/icons/logo-icon-black-and-white-inverse/icon.iconset/icon_16x16.png',
preloadWindow: true,
showDockIcon: false,
showOnAllWorkspaces: false,
browserWindow: {
width: 500,
height: 500,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
webviewTag: true
}
showOnRightClick: false,
userAgent:
"MMozilla/5.0 (Linux; Android 9; SM-G960F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Mobile Safari/537.36",
desktopUserAgent:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
externalLinks: false,
icon: path + "/icons/logo-icon-black-and-white/icon.iconset/icon_16x16.png",
iconPressed:
path +
"/icons/logo-icon-black-and-white-inverse/icon.iconset/icon_16x16.png",
preloadWindow: true,
showDockIcon: false,
showOnAllWorkspaces: false,
browserWindow: {
width: 500,
height: 500,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
webviewTag: true,
},
},
};


function AppConfig() {
var config = new Config();

if (typeof config.store === 'object') {
/*
* Ignore all local configs from now on
* */
// This is another hack
userPreferences.adBlock = config.store.adBlock;

config.set(Object.assign(userPreferences, {}));
}


this.config = config;

Object.defineProperty(this, 'store', {
get: function () {
// Small hack to avoid issues with versioning and changes to preferences page
defaults.browserWindow.alwaysOnTop = userPreferences.alwaysOnTop;
return {
all: Object.assign(defaults, userPreferences),
userPreferences: userPreferences,
defaults: defaults
}
}
});

var config = new Config();

if (typeof config.store === "object") {
/*
* Ignore all local configs from now on
* */
// This is another hack
userPreferences.adBlock = config.store.adBlock;

config.set(Object.assign(userPreferences, {}));
}

this.config = config;

Object.defineProperty(this, "store", {
get: function () {
// Small hack to avoid issues with versioning and changes to preferences page
defaults.browserWindow.alwaysOnTop = userPreferences.alwaysOnTop;
return {
all: Object.assign(defaults, userPreferences),
userPreferences: userPreferences,
defaults: defaults,
};
},
});
}

AppConfig.prototype = {
update: function (config) {
// This is another hack
this.config.set(config);
}
update: function (config) {
// This is another hack
this.config.set(config);
},
};

var getInstance = function () {
instance = instance || new AppConfig();
return instance;
instance = instance || new AppConfig();
return instance;
};

module.exports = getInstance();
9 changes: 6 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta charset="utf-8" />
<title>Redirecting to https://menutube.rednuclearmonkey.com/</title>
<meta http-equiv="refresh" content="0; URL=https://menutube.rednuclearmonkey.com/">
<link rel="canonical" href="https://menutube.rednuclearmonkey.com/">
<meta
http-equiv="refresh"
content="0; URL=https://menutube.rednuclearmonkey.com/"
/>
<link rel="canonical" href="https://menutube.rednuclearmonkey.com/" />
Loading

0 comments on commit e1fea37

Please sign in to comment.