File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Here are the links to the current version:
28
28
29
29
## Dev
30
30
31
- ```
31
+ ``` sh
32
32
git clone https://github.com/th-ch/youtube-music
33
33
cd youtube-music
34
34
npm install
@@ -48,15 +48,15 @@ Create a folder in `plugins/YOUR-PLUGIN-NAME`:
48
48
49
49
- if you need to manipulate the BrowserWindow, create a file ` back.js ` with the following template:
50
50
51
- ```
51
+ ``` node
52
52
module .exports = win => {
53
53
// win is the BrowserWindow object
54
54
};
55
55
```
56
56
57
57
- if you need to change the front, create a file ` front.js ` with the following template:
58
58
59
- ```
59
+ ``` node
60
60
module .exports = () => {
61
61
// This function will be called as a preload script
62
62
// So you can use front features like `document.querySelector`
@@ -67,7 +67,10 @@ module.exports = () => {
67
67
68
68
- injecting custom CSS: create a ` style.css ` file in the same folder then:
69
69
70
- ```
70
+ ``` node
71
+ const path = require (" path" );
72
+ const { injectCSS } = require (" ../utils" );
73
+
71
74
// back.js
72
75
module .exports = win => {
73
76
injectCSS (win .webContents , path .join (__dirname , " style.css" ));
@@ -76,7 +79,7 @@ module.exports = win => {
76
79
77
80
- changing the HTML:
78
81
79
- ```
82
+ ``` node
80
83
// front.js
81
84
module .exports = () => {
82
85
// Remove the login button
@@ -88,7 +91,7 @@ module.exports = () => {
88
91
89
92
## Build
90
93
91
- ```
94
+ ``` sh
92
95
npm run build
93
96
```
94
97
You can’t perform that action at this time.
0 commit comments