Skip to content

Commit f55d944

Browse files
committed
sure
1 parent b9f8767 commit f55d944

File tree

6 files changed

+62
-39
lines changed

6 files changed

+62
-39
lines changed

.github/workflows/build.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,9 @@ jobs:
3636
- name: Install NPM packages
3737
run: npm install
3838

39-
# Get the ability to unzip.
40-
- name: Install action-zip
41-
uses: montudor/action-zip@v1.0.0
42-
4339
# Run the "build.js" script through our newly acquired Node.js environment.
4440
- name: Run the build node script
45-
run: npm start
41+
run: npm start folders
4642

4743
# Upload the ZIP files to the "Artifacts" tab on this action's page.
4844
## Firefox

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ So, you like to build stuff yourself? Well, here's how to do it.
9999
* ⚠️ IMPORTANTE!!! ⚠️ Make sure you have Node.js & NPM installed, 'cuz the build script uses it!!!!
100100
1. Download le code `git clone https://github.com/ktg5/PlayerTube.git`
101101
2. Install the NPM modules `npm i`
102-
3. Run the build script `npm start`
102+
3. Run the build script `npm start` or `npm start folders` to keep the folders or `npm start zips` to keep the zips.
103103
4. Once the building script is done and no errors appear, follow the instructions for [loading the extension for your browser](https://github.com/ktg5/PlayerTube#chromium-browsers-chrome-opera-brave) via the "Beta / Dev builds" instructions
104104

105105

build.js

+44-25
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,47 @@ async function copyDir(sourceDir, newDir) {
5050
}
5151
}
5252

53+
54+
var delFolders = false;
55+
var delZips = false;
56+
// Check for args
57+
process.argv.forEach(function (val, index, array) {
58+
if (index === 2 && val === "folders") {
59+
delZips = true;
60+
} else if (index === 2 && val === "zips") {
61+
delFolders = true;
62+
}
63+
});
64+
65+
5366
console.log(`-------------`);
5467

5568
// Here's we build.
5669
// So first, let's copy this folder for Chrome.
5770
copyDir('./', chromeDir).then(async () => {
5871
console.log(`(Re)made the Chrome folder`);
5972

60-
// If the zip already exists...
61-
if (fs.existsSync(`${chromeDir}.zip`)) {
62-
console.log("Deleting old Chrome zip");
63-
fs.unlinkSync(`${chromeDir}.zip`);
64-
console.log("Deleted old Chrome zip");
65-
}
73+
if (!delZips) {
74+
// If the zip already exists...
75+
if (fs.existsSync(`${chromeDir}.zip`)) {
76+
console.log("Deleting old Chrome zip");
77+
fs.unlinkSync(`${chromeDir}.zip`);
78+
console.log("Deleted old Chrome zip");
79+
}
6680

67-
console.log("Zipping Chrome version...");
68-
// Try to zip up the extension
69-
try {
70-
const zip = new Zip();
71-
const outputDir = `${chromeDir}.zip`;
72-
zip.addLocalFolder(chromeDir);
73-
zip.writeZip(outputDir);
74-
} catch (e) {
75-
console.log(`WHAT THE FRICK! ${e}`);
81+
console.log("Zipping Chrome version...");
82+
// Try to zip up the extension
83+
try {
84+
const zip = new Zip();
85+
const outputDir = `${chromeDir}.zip`;
86+
zip.addLocalFolder(chromeDir);
87+
zip.writeZip(outputDir);
88+
if (delFolders) fs.rmSync(chromeDir, { recursive: true });
89+
} catch (e) {
90+
console.log(`WHAT THE FRICK! ${e}`);
91+
}
92+
console.log(`Zipped Chrome version into ${chromeDir}.zip`);
7693
}
77-
console.log(`Zipped Chrome version into ${chromeDir}.zip`);
7894
console.log(`-------------`);
7995
});
8096

@@ -146,16 +162,19 @@ copyDir('./', firefoxDir).then(async () => {
146162
}
147163

148164
console.log("Zipping Firefox version...");
149-
// Try to zip up the extension
150-
try {
151-
const zip = new Zip();
152-
const outputDir = `${firefoxDir}.zip`;
153-
zip.addLocalFolder(firefoxDir);
154-
zip.writeZip(outputDir);
155-
} catch (e) {
156-
console.log(`WHAT THE FRICK! ${e}`);
165+
if (!delZips) {
166+
// Try to zip up the extension
167+
try {
168+
const zip = new Zip();
169+
const outputDir = `${firefoxDir}.zip`;
170+
zip.addLocalFolder(firefoxDir);
171+
zip.writeZip(outputDir);
172+
if (delFolders) fs.rmSync(firefoxDir, { recursive: true });
173+
} catch (e) {
174+
console.log(`WHAT THE FRICK! ${e}`);
175+
}
176+
console.log(`Zipped Firefox version into ${firefoxDir}.zip`);
157177
}
158-
console.log(`Zipped Firefox version into ${firefoxDir}.zip`);
159178
// End
160179
console.log(`-------------`);
161180
});

html/update.html

+15-5
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@
3030
<div class="text">
3131
<!-- <b>New updates to the <a href="extensions.html">Extension Support page</a>! Please check it to see if you need to do manual configuration for your extensions!</b>
3232
<br> -->
33-
<div class="v1dot8dot1">
33+
<div class="v1dot8dot2">
3434
<h1>PlayerTube has been updated!</h1>
3535
<ul>
36-
<li>Added <a href="https://github.com/ktg5/PlayerTube/pull/32">#32 -- Fix volume sliders for all themes</a> + additional fixes by myself. (hi ladd you're on here now)</li>
37-
<li>Fixed <a href="https://github.com/ktg5/PlayerTube/issues/33">#33 -- "[ Bug ] Scrubber is Always On"</a></li>
38-
<li>Hovering over a video or pausing a video will now extend the progress bar like in Rehike/Project V3.</li>
39-
<li>Fixed styling on extension popup.</li>
36+
<li>Updated links in settings popup.</li>
37+
<li>Build script improvements.</li>
4038
</ul>
4139
</div>
4240

@@ -54,6 +52,18 @@ <h1>PlayerTube has been updated!</h1>
5452
<br>
5553

5654
<h2>Past versions...</h2>
55+
<div class="v1dot8dot1">
56+
<div style="font-weight: 600;">v1.8.1</div>
57+
<ul>
58+
<li>Added <a href="https://github.com/ktg5/PlayerTube/pull/32">#32 -- Fix volume sliders for all themes</a> + additional fixes by myself. (hi ladd you're on here now)</li>
59+
<li>Fixed <a href="https://github.com/ktg5/PlayerTube/issues/33">#33 -- "[ Bug ] Scrubber is Always On"</a></li>
60+
<li>Hovering over a video or pausing a video will now extend the progress bar like in Rehike/Project V3.</li>
61+
<li>Fixed styling on extension popup.</li>
62+
</ul>
63+
</div>
64+
65+
<br>
66+
5767
<div class="v1dot8">
5868
<div style="font-weight: 600;">v1.8</div>
5969
<div style="margin-bottom: 12px;">This update shouldn't have taken so long, but I've working on other stuff recently!!</div>

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
},
99
"scripts": {
1010
"start": "node build.js",
11-
"v3": "node v3Maker.js",
12-
"test": "echo \"Error: no test specified\" && exit 1"
11+
"v3": "node v3Maker.js"
1312
},
1413
"repository": {
1514
"type": "git",

src/pt-main.js

-1
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,6 @@ function startPlayer() {
875875
});
876876
document.querySelector('.html5-video-container video').addEventListener('mouseout', () => {
877877
let videoDiv = document.querySelector('.html5-video-player video');
878-
console.log(videoDiv.paused);
879878
if (videoDiv && videoDiv.paused != true) document.querySelector('.html5-video-player').setAttribute('pt-video-hover', 'false');
880879
});
881880

0 commit comments

Comments
 (0)