diff --git a/index.js b/index.js index cec4fac..446003c 100644 --- a/index.js +++ b/index.js @@ -9,21 +9,17 @@ const app = express() app.get("/download", (req, res) => { const filename = req.query.filename const url = req.query.url - const format= req.query.format + const format = req.query.format const quality = req.query.quality - - if ((filename === 'string' && url === 'string' && format === 'string' && quality === 'string')) { - res.header('Content-Disposition', `attachment; filename="${filename}.${format}"`); - ytdl(url, {'format': format, 'quality': quality}).pipe(res); - } else { - res.send('Please input proper values in all fields.') - } + + res.header('Content-Disposition', `attachment; filename="${filename}.${format}"`); + ytdl(url, { 'format': format, 'quality': quality }).pipe(res); }); app.use(express.static(path.join(__dirname, 'static'))) -app.listen(PORT, function() { +app.listen(PORT, function () { console.log("Hosted on port " + PORT) }) \ No newline at end of file diff --git a/static/index.html b/static/index.html index ab07d88..d365710 100644 --- a/static/index.html +++ b/static/index.html @@ -6,46 +6,51 @@ - - - + + Youtube Downloader -

Youtube Downloader +

Youtube Downloader

v1.0


+

Video URL:

-
-
- -

Quality:

-
- -
- -
- -
+ +

Quality:

+ +

Filename:

+
+

Format:

+ +
+
+

Thank you, please consider donating so that I may pay for hosting costs! (Or, you may also help me out by + hosting it yourself instead of using this site! (Check github for more details)


+

Check out the Github page to + learn how to host it yourself, how it works, report bugs, and more.

\ No newline at end of file diff --git a/static/style.css b/static/style.css index 8e56479..299b096 100644 --- a/static/style.css +++ b/static/style.css @@ -1,5 +1,6 @@ :root { - --text-color: rgb(230, 210, 255); + --primary-color: rgb(230, 210, 255); + --text-color: white; --background-color: rgb(50, 35, 75); --second-bg-color: black; } @@ -10,7 +11,14 @@ font-family: Verdana, Geneva, Tahoma, sans-serif; } -p, select, input { +h1, +h1>* { + color: var(--primary-color) +} + +p, +select, +input { font-size: 1.4rem; } @@ -18,30 +26,37 @@ p { margin: 5px; } -body, html { +body, +html { background-color: var(--background-color); } .grid-container { width: 100%; - margin: auto; + margin: auto; } -/* .grid-container > *:not(select, input) { - float: left; -} */ - -select, input{ +select, +input { display: inline-grid; background-color: var(--second-bg-color); - color: var(--text-color); + color: var(--primary-color); margin: 5px auto; - border: 2px var(--text-color) solid; + border: 2px var(--primary-color) solid; border-radius: 5px; - /* width: 70%; */ padding: 5px; } +.col-sm-3 { + outline: white solid 2px +} + +select:hover, +input:hover { + color: var(--text-color); + border-color: var(--text-color) +} + label { font-size: 1.5rem; } \ No newline at end of file