Compare commits

...

22 Commits

Author SHA1 Message Date
a3d5c038ea Merge pull request #13 from th-ch/snyk-upgrade-5770951f6ab79d4e413754bb7cab1225
[Snyk] Upgrade electron-localshortcut from 3.1.0 to 3.2.1
2020-03-15 12:38:57 +01:00
TC
91f7a0d1a5 Upgrade electron-localshortcut from 3.1.0 to 3.2.1 2020-03-15 12:22:41 +01:00
d5a6e50017 Merge pull request #12 from th-ch/snyk-upgrade-ab1b7600d9bb3bfaa5180a93741f304a
[Snyk] Upgrade electron-updater from 4.0.6 to 4.2.2
2020-03-15 12:21:17 +01:00
TC
6d8204f60a Bump appveyor to node 10 (semver requires node >=10) 2020-03-15 12:02:44 +01:00
TC
f25bb59065 Bump electron updater 2020-03-15 12:02:12 +01:00
39c7d56791 Merge pull request #15 from th-ch/snyk-upgrade-d9ce5c80db3f2ceedbda9bf03d7e2e8e
[Snyk] Upgrade electron-debug from 2.1.0 to 2.2.0
2020-03-15 11:56:01 +01:00
1a0369b69d Merge pull request #16 from th-ch/fix-vulnerability
Fix vulnerability
2020-03-15 11:55:19 +01:00
e5b4e01a96 fix: upgrade electron-debug from 2.1.0 to 2.2.0
Snyk has created this PR to upgrade electron-debug from 2.1.0 to 2.2.0.

See this package in NPM:
https://www.npmjs.com/package/electron-debug

See this project in Snyk:
https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr
2020-03-15 02:28:47 +00:00
TC
0a6587942b Add snyk badge to readme 2020-03-15 00:15:28 +01:00
TC
7050dfca5c Bump electron-store to fix a vulnerability 2020-03-15 00:03:58 +01:00
4a7a94240a Merge pull request #11 from th-ch/autoconfirm-when-paused
Plugin: autoconfirm when paused
2020-03-14 23:43:22 +01:00
TC
479013f9c9 Generate fake package.json for electron-builder to resolve modules 2020-03-14 23:11:11 +01:00
TC
164c3141ca Bump version to 1.2.0 2020-03-14 18:14:54 +01:00
TC
234954a86c Travis: fix MacOS build 2020-03-14 18:03:26 +01:00
TC
8c19757dfc Readme: build with npm 2020-03-14 16:46:43 +01:00
TC
790185893d Build/release with npm on travis 2020-03-14 16:31:07 +01:00
TC
7a816fa4f3 Use node 10 in linux container 2020-03-14 15:22:45 +01:00
TC
d4b5c53dc3 Add env var to allow unresolved deps 2020-03-14 14:51:19 +01:00
TC
e1b83f07a8 Block promo element 2020-03-14 09:32:48 +01:00
TC
b855726973 New plugin: autoconfirm when paused 2020-03-14 09:32:37 +01:00
TC
9371a4827e Migrate to yarn to install packages without package.json (but keep npm rebuild) 2020-03-14 09:32:14 +01:00
TC
81ce939451 Lint readme 2020-03-13 22:17:54 +01:00
10 changed files with 5364 additions and 7322 deletions

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
engine-strict=true
scripts-prepend-node-path=true

View File

@ -13,8 +13,8 @@ matrix:
language: generic
cache:
yarn: false
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
@ -30,13 +30,15 @@ script:
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder \
/bin/bash -c "npm install && npm run release:linux"
electronuserland/builder:10 \
/bin/bash -c "yarn && npm run release:linux"
else
npm run release:mac
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder
before_install:
- rm -rf node_modules
branches:
except:

View File

@ -11,10 +11,10 @@ init:
- git config --global core.autocrlf input
install:
- ps: Install-Product node 8 x64
- npm install
- ps: Install-Product node 10 x64
- yarn
build_script:
- npm run release:win
- yarn run release:win
test: off

7301
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "1.1.6",
"version": "1.2.0",
"description": "YouTube Music Desktop App - including custom plugins",
"license": "MIT",
"repository": "th-ch/youtube-music",
@ -29,22 +29,27 @@
"test": "xo",
"start": "electron .",
"icon": "rimraf assets/generated && electron-icon-maker --input=assets/youtube-music.png --output=assets/generated",
"postinstall": "npm run icon && npm rebuild && node plugins/adblocker/generator.js && electron-rebuild",
"generate:package": "node utils/generate-package-json.js",
"postinstall": "yarn run generate:package YoutubeNonStop && yarn run icon && npm rebuild && node plugins/adblocker/generator.js && electron-rebuild",
"clean": "rimraf dist",
"build": "npm run clean && build --win --mac --linux",
"build:mac": "npm run clean && build --mac",
"build:win": "npm run clean && build --win",
"release:linux": "npm run clean && build --linux -p always",
"release:mac": "npm run clean && build --mac -p always",
"release:win": "npm run clean && build --win -p always"
"build": "yarn run clean && build --win --mac --linux",
"build:mac": "yarn run clean && build --mac",
"build:win": "yarn run clean && build --win",
"release:linux": "yarn run clean && build --linux -p always",
"release:mac": "yarn run clean && build --mac -p always",
"release:win": "yarn run clean && build --win -p always"
},
"engines": {
"npm": "Please use yarn and not npm"
},
"dependencies": {
"YoutubeNonStop": "git://github.com/lawfx/YoutubeNonStop.git#v0.7.1",
"ad-block": "^4.1.3",
"electron-debug": "^2.0.0",
"electron-debug": "^2.2.0",
"electron-is": "^3.0.0",
"electron-localshortcut": "^3.1.0",
"electron-store": "^2.0.0",
"electron-updater": "^4.0.6"
"electron-localshortcut": "^3.2.1",
"electron-store": "^3.1.0",
"electron-updater": "^4.2.2"
},
"devDependencies": {
"devtron": "^1.4.0",

View File

@ -0,0 +1,12 @@
// Define global chrome object to be compliant with the extension code
global.chrome = {
runtime: {
getManifest: () => ({
version: 1
})
}
};
module.exports = () => {
require("YoutubeNonStop/autoconfirm.js");
};

View File

@ -1,9 +1,11 @@
# YouTube Music
[![GitHub release](https://img.shields.io/github/release/th-ch/youtube-music.svg)](https://GitHub.com/th-ch/youtube-music/releases/)
[![GitHub license](https://img.shields.io/github/license/th-ch/youtube-music.svg)](https://github.com/th-ch/youtube-music/blob/master/LICENSE)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![Build status](https://ci.appveyor.com/api/projects/status/tgre12r150ynvwl2?svg=true)](https://ci.appveyor.com/project/th-ch/youtube-music)
[![Build Status](https://travis-ci.org/th-ch/youtube-music.svg?branch=master)](https://travis-ci.org/th-ch/youtube-music)
[![Known Vulnerabilities](https://snyk.io/test/github/th-ch/youtube-music/badge.svg)](https://snyk.io/test/github/th-ch/youtube-music)
![Screenshot](screenshot.jpg "Screenshot")
@ -22,14 +24,15 @@ You can check out the [latest release](https://github.com/th-ch/youtube-music/re
- **No Google Login**: remove Google login buttons and links from the interface
- **Shortcuts**: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music
- **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser
- **Auto confirm when paused**: when the "Continue Watching?" modal appears, automatically click "Yes"
## Dev
```sh
git clone https://github.com/th-ch/youtube-music
cd youtube-music
npm install
npm start
yarn
yarn start
```
## Build your own plugins
@ -80,7 +83,7 @@ module.exports = win => {
// front.js
module.exports = () => {
// Remove the login button
document.querySelector('.sign-in-link.ytmusic-nav-bar').remove();
document.querySelector(".sign-in-link.ytmusic-nav-bar").remove();
};
```

34
utils/generate-package-json.js Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env node
const { existsSync, writeFile } = require("fs");
const { join } = require("path");
const { promisify } = require("util");
/**
* Generates a fake package.json for given packages that don't have any.
* Allows electron-builder to resolve them
*/
const generatePackageJson = async packageName => {
var filepath = join("node_modules", packageName, "package.json");
if (!existsSync(filepath)) {
console.log(
`No package.json found for ${packageName} module, generating one…`
);
pkg = {
name: packageName,
version: "0.0.0",
description: "-",
repository: { type: "git", url: "-" },
readme: "-"
};
const writeFileAsync = promisify(writeFile);
await writeFileAsync(filepath, JSON.stringify(pkg, null, 2));
}
};
if (require.main === module) {
process.argv.slice(2).forEach(async packageName => {
await generatePackageJson(packageName);
});
}

5280
yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -23,3 +23,8 @@ ytmusic-app-layout {
ytmusic-search-box.ytmusic-nav-bar {
margin-top: 12px;
}
/* Blocking annoying elements */
ytmusic-mealbar-promo-renderer {
display: none !important;
}