mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fd10ea4a0 | |||
| 746b5f13bb | |||
| 474bfd19a2 | |||
| 71222649a0 | |||
| 1a72129108 | |||
| 3108e16018 | |||
| fae19f4533 | |||
| 348f1b8189 | |||
| ffdc7f66b9 |
17
index.js
17
index.js
@ -42,8 +42,10 @@ function createMainWindow() {
|
|||||||
backgroundColor: "#000",
|
backgroundColor: "#000",
|
||||||
show : false,
|
show : false,
|
||||||
webPreferences : {
|
webPreferences : {
|
||||||
nodeIntegration: false,
|
nodeIntegration : false,
|
||||||
preload : path.join(__dirname, "preload.js")
|
preload : path.join(__dirname, "preload.js"),
|
||||||
|
nativeWindowOpen: true, // window.open return Window object(like in regular browsers), not BrowserWindowProxy
|
||||||
|
affinity : "main-window" // main window, and addition windows should work in one process
|
||||||
},
|
},
|
||||||
frame : !is.macOS(),
|
frame : !is.macOS(),
|
||||||
titleBarStyle: is.macOS() ? "hiddenInset": "default"
|
titleBarStyle: is.macOS() ? "hiddenInset": "default"
|
||||||
@ -86,6 +88,17 @@ function createMainWindow() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
win.webContents.on(
|
||||||
|
"new-window",
|
||||||
|
(e, url, frameName, disposition, options) => {
|
||||||
|
// hook on new opened window
|
||||||
|
|
||||||
|
// at now new window in mainWindow renderer process.
|
||||||
|
// Also, this will automatically get an option `nodeIntegration=false`(not override to true, like in iframe's) - like in regular browsers
|
||||||
|
options.webPreferences.affinity = "main-window";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
win.on("move", () => {
|
win.on("move", () => {
|
||||||
let position = win.getPosition();
|
let position = win.getPosition();
|
||||||
store.set("window-position", { x: position[0], y: position[1] });
|
store.set("window-position", { x: position[0], y: position[1] });
|
||||||
|
|||||||
70
package-lock.json
generated
70
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "youtube-music",
|
"name": "youtube-music",
|
||||||
"version": "1.1.3",
|
"version": "1.1.6",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -111,7 +111,7 @@
|
|||||||
"integrity": "sha512-VtLcSSIUKzLG9BnWx6LbWjtesYTUxddAxiqn7Ih0o9lLD0XBKIX1IPPYm4uJF+Pri4Fj5bqqmfeh8bsOu0Ju5A==",
|
"integrity": "sha512-VtLcSSIUKzLG9BnWx6LbWjtesYTUxddAxiqn7Ih0o9lLD0XBKIX1IPPYm4uJF+Pri4Fj5bqqmfeh8bsOu0Ju5A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bloom-filter-cpp": "^1.2.2",
|
"bloom-filter-cpp": "^1.2.2",
|
||||||
"hashset-cpp": "^2.1.1",
|
"hashset-cpp": "^2.2.1",
|
||||||
"nan": "^2.10.0"
|
"nan": "^2.10.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -2461,10 +2461,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-utils": {
|
"eslint-utils": {
|
||||||
"version": "1.3.1",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
|
||||||
"integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
|
"integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"eslint-visitor-keys": "^1.0.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"eslint-visitor-keys": {
|
"eslint-visitor-keys": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@ -4115,9 +4118,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.11",
|
"version": "4.17.14",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz",
|
||||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
|
"integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash.assign": {
|
"lodash.assign": {
|
||||||
@ -4150,9 +4153,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash.mergewith": {
|
"lodash.mergewith": {
|
||||||
"version": "4.6.1",
|
"version": "4.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
|
||||||
"integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
|
"integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash.snakecase": {
|
"lodash.snakecase": {
|
||||||
@ -4364,9 +4367,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mixin-deep": {
|
"mixin-deep": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
|
||||||
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
|
"integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"for-in": "^1.0.2",
|
"for-in": "^1.0.2",
|
||||||
@ -5610,9 +5613,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"set-value": {
|
"set-value": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
|
||||||
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
|
"integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"extend-shallow": "^2.0.1",
|
"extend-shallow": "^2.0.1",
|
||||||
@ -6465,38 +6468,15 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"union-value": {
|
"union-value": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
|
||||||
"integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
|
"integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"arr-union": "^3.1.0",
|
"arr-union": "^3.1.0",
|
||||||
"get-value": "^2.0.6",
|
"get-value": "^2.0.6",
|
||||||
"is-extendable": "^0.1.1",
|
"is-extendable": "^0.1.1",
|
||||||
"set-value": "^0.4.3"
|
"set-value": "^2.0.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"extend-shallow": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
|
||||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-extendable": "^0.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"set-value": {
|
|
||||||
"version": "0.4.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
|
|
||||||
"integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"extend-shallow": "^2.0.1",
|
|
||||||
"is-extendable": "^0.1.1",
|
|
||||||
"is-plain-object": "^2.0.1",
|
|
||||||
"to-object-path": "^0.3.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unique-string": {
|
"unique-string": {
|
||||||
|
|||||||
66
package.json
66
package.json
@ -1,60 +1,60 @@
|
|||||||
{
|
{
|
||||||
"name" : "youtube-music",
|
"name": "youtube-music",
|
||||||
"productName": "YouTube Music",
|
"productName": "YouTube Music",
|
||||||
"version" : "1.1.5",
|
"version": "1.1.6",
|
||||||
"description": "YouTube Music Desktop App - including custom plugins",
|
"description": "YouTube Music Desktop App - including custom plugins",
|
||||||
"license" : "MIT",
|
"license": "MIT",
|
||||||
"repository" : "th-ch/youtube-music",
|
"repository": "th-ch/youtube-music",
|
||||||
"author" : {
|
"author": {
|
||||||
"name" : "th-ch",
|
"name": "th-ch",
|
||||||
"email": "th-ch@users.noreply.github.com",
|
"email": "th-ch@users.noreply.github.com",
|
||||||
"url" : "https://github.com/th-ch/youtube-music"
|
"url": "https://github.com/th-ch/youtube-music"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId" : "com.github.th-ch.youtube-music",
|
"appId": "com.github.th-ch.youtube-music",
|
||||||
"productName": "YouTube Music",
|
"productName": "YouTube Music",
|
||||||
"mac" : {
|
"mac": {
|
||||||
"identity": null,
|
"identity": null,
|
||||||
"icon" : "assets/generated/icons/mac/icon.icns"
|
"icon": "assets/generated/icons/mac/icon.icns"
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
"icon": "assets/generated/icons/win/icon.ico"
|
"icon": "assets/generated/icons/win/icon.ico"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"icon" : "assets/generated/icons/png",
|
"icon": "assets/generated/icons/png",
|
||||||
"category": "AudioVideo"
|
"category": "AudioVideo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test" : "xo",
|
"test": "xo",
|
||||||
"start" : "electron .",
|
"start": "electron .",
|
||||||
"icon" : "rimraf assets/generated && electron-icon-maker --input=assets/youtube-music.png --output=assets/generated",
|
"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",
|
"postinstall": "npm run icon && npm rebuild && node plugins/adblocker/generator.js && electron-rebuild",
|
||||||
"clean" : "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"build" : "npm run clean && build --win --mac --linux",
|
"build": "npm run clean && build --win --mac --linux",
|
||||||
"build:mac" : "npm run clean && build --mac",
|
"build:mac": "npm run clean && build --mac",
|
||||||
"build:win" : "npm run clean && build --win",
|
"build:win": "npm run clean && build --win",
|
||||||
"release:linux": "npm run clean && build --linux -p always",
|
"release:linux": "npm run clean && build --linux -p always",
|
||||||
"release:mac" : "npm run clean && build --mac -p always",
|
"release:mac": "npm run clean && build --mac -p always",
|
||||||
"release:win" : "npm run clean && build --win -p always"
|
"release:win": "npm run clean && build --win -p always"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ad-block" : "^4.1.3",
|
"ad-block": "^4.1.3",
|
||||||
"electron-debug" : "^2.0.0",
|
"electron-debug": "^2.0.0",
|
||||||
"electron-is" : "^3.0.0",
|
"electron-is": "^3.0.0",
|
||||||
"electron-localshortcut": "^3.1.0",
|
"electron-localshortcut": "^3.1.0",
|
||||||
"electron-store" : "^2.0.0",
|
"electron-store": "^2.0.0",
|
||||||
"electron-updater" : "^4.0.6"
|
"electron-updater": "^4.0.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"devtron" : "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron" : "^4.0.8",
|
"electron": "^4.0.8",
|
||||||
"electron-builder" : "^20.40.2",
|
"electron-builder": "^20.40.2",
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
"electron-icon-maker" : "0.0.4",
|
"electron-icon-maker": "0.0.4",
|
||||||
"electron-rebuild" : "^1.8.4",
|
"electron-rebuild": "^1.8.4",
|
||||||
"rimraf" : "^2.6.3",
|
"rimraf": "^2.6.3",
|
||||||
"xo" : "^0.24.0"
|
"xo": "^0.24.0"
|
||||||
},
|
},
|
||||||
"xo": {
|
"xo": {
|
||||||
"envs": [
|
"envs": [
|
||||||
|
|||||||
Reference in New Issue
Block a user