├── now.json ├── assets ├── icons │ ├── a │ │ ├── 4fun.png │ │ └── ck.jpg │ ├── empty.png │ ├── head.png │ ├── icon.png │ ├── music.gif │ ├── random.png │ ├── playlist.png │ ├── youtube.png │ ├── logo │ │ ├── l_osu.png │ │ ├── l_github.png │ │ └── l_discord.png │ ├── notif-icon │ │ ├── i_add.png │ │ ├── i_np.png │ │ ├── i_up.png │ │ ├── i_error.png │ │ ├── i_loved.png │ │ ├── i_yt_start.png │ │ └── i_yt_finish.png │ ├── fontawsome │ │ ├── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ └── fa-solid-900.woff2 │ │ └── css │ │ │ ├── brands.min.css │ │ │ ├── solid.min.css │ │ │ ├── regular.min.css │ │ │ ├── brands.css │ │ │ ├── regular.css │ │ │ ├── solid.css │ │ │ ├── svg-with-js.min.css │ │ │ ├── svg-with-js.css │ │ │ └── v4-shims.min.css │ └── osu.svg ├── fonts │ └── torus │ │ ├── 39F3E3_2_0.eot │ │ ├── 39F3E3_2_0.ttf │ │ ├── 39F3E3_2_0.woff │ │ └── 39F3E3_2_0.woff2 ├── css │ ├── reset.css │ └── subtitles.css ├── js │ ├── discord.js │ ├── autoupdater.js │ ├── export.js │ ├── notification.js │ ├── mvue.js │ ├── mini.js │ ├── subtitles.js │ ├── youtube.js │ ├── import.js │ ├── settings.js │ └── main.js └── modules │ └── axios.js ├── .gitignore ├── .editorconfig ├── preloader.html ├── package.json ├── README.md ├── notification.html ├── tempNotification.html ├── embed.html ├── main.js └── index.html /now.json: -------------------------------------------------------------------------------- 1 | {"volume":10,"id":"jTCqVXOuq6c","start":53.214593,"radio":false} -------------------------------------------------------------------------------- /assets/icons/a/4fun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/a/4fun.png -------------------------------------------------------------------------------- /assets/icons/a/ck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/a/ck.jpg -------------------------------------------------------------------------------- /assets/icons/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/empty.png -------------------------------------------------------------------------------- /assets/icons/head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/head.png -------------------------------------------------------------------------------- /assets/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/icon.png -------------------------------------------------------------------------------- /assets/icons/music.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/music.gif -------------------------------------------------------------------------------- /assets/icons/random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/random.png -------------------------------------------------------------------------------- /assets/icons/playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/playlist.png -------------------------------------------------------------------------------- /assets/icons/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/youtube.png -------------------------------------------------------------------------------- /assets/icons/logo/l_osu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/logo/l_osu.png -------------------------------------------------------------------------------- /assets/icons/logo/l_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/logo/l_github.png -------------------------------------------------------------------------------- /assets/fonts/torus/39F3E3_2_0.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/fonts/torus/39F3E3_2_0.eot -------------------------------------------------------------------------------- /assets/fonts/torus/39F3E3_2_0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/fonts/torus/39F3E3_2_0.ttf -------------------------------------------------------------------------------- /assets/icons/logo/l_discord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/logo/l_discord.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_add.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_np.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_np.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_up.png -------------------------------------------------------------------------------- /assets/fonts/torus/39F3E3_2_0.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/fonts/torus/39F3E3_2_0.woff -------------------------------------------------------------------------------- /assets/fonts/torus/39F3E3_2_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/fonts/torus/39F3E3_2_0.woff2 -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_error.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_loved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_loved.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_yt_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_yt_start.png -------------------------------------------------------------------------------- /assets/icons/notif-icon/i_yt_finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/notif-icon/i_yt_finish.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /node_modules 3 | /node_modules_bak 4 | .vscode 5 | 6 | # locks 7 | package-lock.json 8 | yarn.lock 9 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /assets/icons/fontawsome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SGezha/YOMP/HEAD/assets/icons/fontawsome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [{*.yml,*.js,*.json,*.vue,*.sass,*.scss,*.css,*.ts,*.d.ts,*.html,*.hbs,*.pug,*.go}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/brands.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;font-display:auto;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"} -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/solid.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900} -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/regular.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400} -------------------------------------------------------------------------------- /assets/css/reset.css: -------------------------------------------------------------------------------- 1 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0} 2 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/brands.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Brands'; 7 | font-style: normal; 8 | font-weight: normal; 9 | font-display: auto; 10 | src: url("../webfonts/fa-brands-400.eot"); 11 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } 12 | 13 | .fab { 14 | font-family: 'Font Awesome 5 Brands'; } 15 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/regular.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 400; 9 | font-display: auto; 10 | src: url("../webfonts/fa-regular-400.eot"); 11 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } 12 | 13 | .far { 14 | font-family: 'Font Awesome 5 Free'; 15 | font-weight: 400; } 16 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/solid.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 900; 9 | font-display: auto; 10 | src: url("../webfonts/fa-solid-900.eot"); 11 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } 12 | 13 | .fa, 14 | .fas { 15 | font-family: 'Font Awesome 5 Free'; 16 | font-weight: 900; } 17 | -------------------------------------------------------------------------------- /assets/js/discord.js: -------------------------------------------------------------------------------- 1 | function discordUpdate() { 2 | let progress = ""; 3 | for (let i = 0; i < 10; i++) { 4 | if (parseInt(musicStatus.progress / 10).toFixed(0) > i) { 5 | progress += "-"; 6 | } else if (parseInt(musicStatus.progress / 10).toFixed(0) == i) { 7 | progress += "●"; 8 | } else { 9 | progress += "-" 10 | } 11 | } 12 | if (document.getElementsByClassName('pl-current')[0]) { 13 | ipc.send("rpc", { 14 | status: "playing", 15 | title: document.querySelector('.ap-title').innerHTML, 16 | progress: `${musicStatus.curTime} [${progress}] ${musicStatus.durTime}` 17 | }); 18 | } else { 19 | ipc.send("rpc", { 20 | status: "paused", 21 | title: document.querySelector('.ap-title').innerHTML, 22 | progress: `${musicStatus.curTime} [${progress}] ${musicStatus.durTime}` 23 | }); 24 | } 25 | setTimeout(() => { discordUpdate() }, 5000); 26 | } 27 | -------------------------------------------------------------------------------- /preloader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | YOMP 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
4FuN
22 |
|
23 |
ck
24 |
25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /assets/js/autoupdater.js: -------------------------------------------------------------------------------- 1 | function checkUpdate(auto) { 2 | let ver = JSON.parse(fs.readFileSync(`${__dirname}/package.json`).toString()).version; 3 | axios.get(`https://4kc-version.glitch.me/yomp`).then(res => { 4 | let r = res.data; 5 | if (ver != r.ver && auto) notify("Update", `New ${r.ver} version available to download, check settings :3`); 6 | if (ver == r.ver && !auto) notify("Update", `You use latest version :P`); 7 | if (ver != r.ver && !auto) { 8 | notify("Update", `New version ${r.ver} started to download c:`); 9 | let osp = os.platform(), 10 | arch = os.arch().split("x").join(""); 11 | if (osp.indexOf("win") > -1) osp = "win"; 12 | remote.require("electron-download-manager").download({ 13 | url: r[osp + arch], 14 | onProgress: (p) => { 15 | document.getElementById("upda").innerHTML = `UPDATE ${p.progress.toFixed(0)}%` 16 | } 17 | }, function (error, info) { 18 | if (error) { console.log(error); return; } 19 | notify("Update", `Download update complete :>`); 20 | child(`${info.filePath.toString().split("\\").join("/")}`, function (err, data) { 21 | if (err) { console.error(err); return; } 22 | }); 23 | setTimeout(() => { 24 | window.close(); 25 | }, 1000) 26 | }); 27 | } 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /assets/js/export.js: -------------------------------------------------------------------------------- 1 | const NodeID3 = require('node-id3') 2 | 3 | async function exportLoved() { 4 | let dir = await remote.dialog.showOpenDialog({ title: 'Select osu!/songs Folder', properties: ['openDirectory'] }); 5 | let exportLoved = []; 6 | db().query("SELECT * from music").forEach(m => { if (m.loved == 1) exportLoved.push(m); }); 7 | if (dir.filePaths[0]) { 8 | setsToggle(); 9 | loadMusic(); 10 | exportProces(0, exportLoved, dir); 11 | } 12 | } 13 | 14 | async function exportAll() { 15 | let dir = await remote.dialog.showOpenDialog({ title: 'Select osu!/songs Folder', properties: ['openDirectory'] }); 16 | if (dir.filePaths[0]) { 17 | setsToggle(); 18 | loadMusic(); 19 | exportProces(0, db().query("SELECT * from music"), dir); 20 | } 21 | } 22 | 23 | function exportProces(id, mas, dir) { 24 | if (id == mas.length) return loadMusic(); 25 | let e = mas[id]; 26 | document.getElementById("load-progress").innerHTML = `
${e.title}
${id + 1}/${mas.length}`; 27 | fs.copyFile(e.file, `${dir.filePaths[0]}/${e.title}.mp3`, (err) => { 28 | if (err) throw err; 29 | let metadata = { 30 | title: e.title.split(" - ")[1], 31 | artist: e.title.split(" - ")[0], 32 | APIC: e.full ? decodeURI(e.full) : decodeURI(e.icon) 33 | } 34 | NodeID3.update(metadata, `${dir.filePaths[0]}/${e.title}.mp3`, function (err, buffer) { exportProces(id + 1, mas, dir); }) 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "YOMP", 3 | "version": "1.1.3", 4 | "description": "Enjoy listening to music from osu! and youtube :3", 5 | "main": "main.js", 6 | "build": { 7 | "productName": "YOMP", 8 | "appId": "YOMP", 9 | "copyright": "Copyright © 2020 ${author}", 10 | "linux": { 11 | "category": "Audio", 12 | "icon": "assets/icons/icon.png" 13 | }, 14 | "win": { 15 | "target": [ 16 | "nsis", 17 | "portable" 18 | ], 19 | "icon": "assets/icons/icon.png" 20 | }, 21 | "nsis": { 22 | "oneClick": false, 23 | "allowToChangeInstallationDirectory": true, 24 | "createDesktopShortcut": true, 25 | "license": "license", 26 | "artifactName": "${productName} Setup ${version}.${ext}" 27 | }, 28 | "portable": { 29 | "artifactName": "${productName} Portable ${version}.${ext}" 30 | } 31 | }, 32 | "scripts": { 33 | "start": "electron .", 34 | "rebuild": "./node_modules/.bin/electron-rebuild.cmd", 35 | "build": "./node_modules/.bin/electron-builder build", 36 | "linux": "./node_modules/.bin/electron-builder build --linux snap", 37 | "build32": "./node_modules/.bin/electron-builder build --ia32", 38 | "postinstall": "./node_modules/.bin/electron-builder install-app-deps" 39 | }, 40 | "author": "4FuN", 41 | "email": "Dr.uma228@gmail.com", 42 | "url": "https://github.com/SGezha/yomp", 43 | "repository": { 44 | "type": "git", 45 | "url": "https://github.com/SGezha/yomp.git" 46 | }, 47 | "devDependencies": { 48 | "electron": "^6.1.12", 49 | "electron-builder": "^22.9.1", 50 | "electron-rebuild": "^1.8.6", 51 | "register-scheme": "0.0.2" 52 | }, 53 | "dependencies": { 54 | "better-sqlite3-helper": "^2.1.1", 55 | "colorthief": "^2.3.2", 56 | "discord-rpc": "^3.1.0", 57 | "music-metadata": "^7.5.0", 58 | "node-id3": "^0.2.2", 59 | "xml-js": "^1.6.11", 60 | "yt-dl-playlist": "^2.1.0" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /assets/js/notification.js: -------------------------------------------------------------------------------- 1 | function notify(title, body, bol) { 2 | if (db().query("SELECT * from settings")[0].notiturn == "false") { 3 | let icon = "assets/icons/icon.png"; 4 | if ((title.toLocaleLowerCase().indexOf("now") > -1 && remote.getCurrentWindow().isFocused())) return; 5 | if (title.toLocaleLowerCase().indexOf("loved") > -1 && remote.getCurrentWindow().isFocused()) return M.toast({ html: ` ${body}` }); 6 | if (db().query("SELECT * from settings")[0].notiloved == "true" && title.toLocaleLowerCase().indexOf("loved") > -1) return; 7 | if (db().query("SELECT * from settings")[0].notiadd == "true" && title.toLocaleLowerCase().indexOf("success") > -1) return; 8 | if (title.toLocaleLowerCase().indexOf("loved") > -1) icon = "assets/icons/notif-icon/i_loved.png"; 9 | if (title.toLocaleLowerCase().indexOf("now") > -1) icon = "assets/icons/notif-icon/i_np.png"; 10 | if (title.toLocaleLowerCase().indexOf("success") > -1) icon = "assets/icons/notif-icon/i_add.png"; 11 | if (title.toLocaleLowerCase().indexOf("error") > -1) icon = "assets/icons/notif-icon/i_error.png"; 12 | if (title.toLocaleLowerCase().indexOf("update") > -1) icon = "assets/icons/notif-icon/i_up.png"; 13 | if (title.toLocaleLowerCase().indexOf("youtube") > -1 && bol) icon = "assets/icons/notif-icon/i_yt_finish.png"; 14 | if (title.toLocaleLowerCase().indexOf("youtube") > -1 && !bol) icon = "assets/icons/notif-icon/i_yt_start.png"; 15 | if (body.length > 40) body = body.substring(0, 40) + "..."; 16 | // let noti = new Notification(title, { silent: true, silent: true, body: body, icon: icon }); 17 | // if (title.toLocaleLowerCase().indexOf("update") > -1) { 18 | // noti.onclick = () => { 19 | // setsToggle(); 20 | // } 21 | // } 22 | if(app._data.playlist[AP.getIndex()]) icon = app._data.playlist[AP.getIndex()].icon; 23 | require('electron').ipcRenderer.send("notification", {title: title, body: body, img: icon}) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

YOMP (YouTube & osu! Music Player)

icon 2 |

Simple music player with the ability to play music from YouTube, osu! and local storage.

3 | Download YOMP 4 | GitHub all releases 5 | Download YOMP 6 |

Features:

7 | 16 |

Screenshots

17 |

enter image description here
18 | enter image description here
19 | enter image description here
20 | enter image description here
21 | enter image description here

22 |

Installation

23 |

Download from Release or build

24 |
clone repository
25 | $ npm i
26 | $ npm run rebuild
27 | $ npm start
28 | 
29 |

License

30 | GNU GENERAL PUBLIC LICENSE 31 | -------------------------------------------------------------------------------- /notification.html: -------------------------------------------------------------------------------- 1 | YOMP
Now playing

Porter Robinson Madeon - Shelter Offici...

-------------------------------------------------------------------------------- /assets/icons/osu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/js/mvue.js: -------------------------------------------------------------------------------- 1 | var app = new Vue({ 2 | el: '#yomp', 3 | data: { 4 | playlist: [], 5 | loved: [], 6 | ver: 0, 7 | youtuberesult: [], 8 | osuimport: "Import osu! songs", 9 | status: { 10 | title: "", 11 | progress: "", 12 | id: 0 13 | } 14 | }, 15 | methods: { 16 | search() { 17 | axios.get("https://www.googleapis.com/youtube/v3/search?part=snippet&q=" + document.getElementById("search").value + "&type=video&maxResults=50&key=AIzaSyBBFxx0yqaUfX8V17A4M8UcAiOx-eKXYcs") 18 | .then(res => { 19 | if (document.getElementById('pl').classList.length == 1) document.getElementById('pl').classList.add("hide"); 20 | this.youtuberesult = []; 21 | res.data.items.forEach(v => { 22 | if (v.id.kind == "youtube#video") { 23 | this.youtuberesult.push(v); 24 | } 25 | }) 26 | }) 27 | } 28 | } 29 | }) 30 | 31 | function searchbtn() { 32 | app.search(); 33 | document.getElementById(`youtube`).style.display = "block"; 34 | } 35 | 36 | document.getElementById("search").onchange = function (e) { 37 | let youtuberesult = []; 38 | let base = db().query("SELECT * from music"); 39 | if (isLoved) { 40 | base = []; 41 | db().query("SELECT * from music").forEach(m => { 42 | if (m.loved == true) base.push(m); 43 | }) 44 | } 45 | // if (base.length == 0) return; 46 | if (document.getElementById("pl").classList.length == 2) return; 47 | let result = []; 48 | let input = document.getElementById('search'); 49 | var l = input.value.length; 50 | axios.get("https://www.googleapis.com/youtube/v3/search?part=snippet&q=" + document.getElementById("search").value + "&type=video&maxResults=10&key=AIzaSyB5jdwiBYfFWBpnHTfc-XA544A8RLvaL_s").then(res => { 51 | res.data.items.forEach(v => { 52 | if (v.id.kind == "youtube#video") { 53 | result.push({ 54 | icon: v.snippet.thumbnails['high'].url, 55 | title: v.snippet.title, 56 | bmid: null, 57 | category: null, 58 | dataId: 3, 59 | dir: null, 60 | fav: ``, 61 | file: ``, 62 | full: null, 63 | hide: true, 64 | need: true, 65 | id: -0, 66 | loved: `false`, 67 | type: ``, 68 | videoId: v.id.videoId 69 | }) 70 | } 71 | }) 72 | readyFind(); 73 | }).catch(er => { 74 | readyFind(); 75 | }) 76 | function readyFind() { 77 | if (l > 0) { 78 | for (var i = 0; i < base.length; i++) { 79 | let title = base[i].title; 80 | if (title.toLowerCase().match(input.value.toLowerCase())) { 81 | result.push(base[i]); 82 | } 83 | } 84 | AP.init({ 85 | playList: result 86 | }); 87 | loaded = 0; 88 | } else { 89 | if (!isLoved) { refresh(); } else { openloved(); } 90 | } 91 | } 92 | }; 93 | -------------------------------------------------------------------------------- /assets/js/mini.js: -------------------------------------------------------------------------------- 1 | function miniPlayer() { 2 | if (document.getElementById('ap').style.transform == "translateY(180px)") { 3 | document.getElementById('ap').style.transform = "translateY(0px)"; 4 | } else { 5 | } 6 | document.getElementById('pl').style.display = "none"; 7 | document.getElementsByClassName('center')[0].style.display = "none"; 8 | document.getElementsByClassName('top')[0].style.transform = "scale(0)"; 9 | document.getElementsByClassName('main')[0].style.background = "transparent"; 10 | document.getElementsByClassName('bottom')[0].style.position = "absolute"; 11 | document.getElementsByClassName('bottom')[0].style.bottom = "0"; 12 | document.querySelector('.ap--settings').style.display = 'none'; 13 | document.querySelector('.ap--playback').style.maxWidth = '110px'; 14 | document.querySelector('.ap--playback').style.flex = '0 0 110px'; 15 | document.querySelector('.ap--track').style.maxWidth = '280px'; 16 | document.querySelector('.ap--track').style.width = '-webkit-fill-available'; 17 | document.querySelector('.ap--track').style.flex = '0 0 280px'; 18 | document.querySelector('.bottom').style.height = '40px'; 19 | document.querySelector('.ap').style.borderRadius = '7px 0 0 0'; 20 | document.querySelector('.ap').style.boxShadow = 'none'; 21 | remote.getCurrentWindow().setSize(400, 40); 22 | remote.getCurrentWindow().setAlwaysOnTop(true); 23 | remote.getCurrentWindow().setPosition(screen.availWidth - 400, screen.availHeight - 40); 24 | remote.getCurrentWindow().setSkipTaskbar(true); 25 | remote.getCurrentWindow().focus(); 26 | mini = true; 27 | } 28 | 29 | function miniPlayerOff() { 30 | if (document.getElementById('ap').style.transform == "translateY(180px)") document.getElementById('ap').style.transform = `translateY(0px)`; 31 | remote.getCurrentWindow().focus(); 32 | document.getElementById('pl').style.display = "block"; 33 | document.getElementsByClassName('center')[0].style.display = null; 34 | document.getElementsByClassName('top')[0].style.transform = "scale(1)"; 35 | document.getElementsByClassName('main')[0].style.background = "var(--bg)"; 36 | document.getElementsByClassName('bottom')[0].style.position = null; 37 | document.getElementsByClassName('bottom')[0].style.bottom = null; 38 | document.querySelector('.ap--settings').style.display = 'flex'; 39 | document.querySelector('.ap--playback').style.maxWidth = null; 40 | document.querySelector('.ap--playback').style.flex = null; 41 | document.querySelector('.ap--track').style.maxWidth = null; 42 | document.querySelector('.ap--track').style.width = null; 43 | document.querySelector('.ap--track').style.flex = null; 44 | document.querySelector('.bottom').style.height = null; 45 | document.querySelector('.ap').style.borderRadius = null; 46 | document.querySelector('.ap').style.boxShadow = null; 47 | remote.getCurrentWindow().setAlwaysOnTop(false); 48 | remote.getCurrentWindow().setSize(1000, 700); 49 | remote.getCurrentWindow().center(); 50 | remote.getCurrentWindow().setSkipTaskbar(false); 51 | mini = false; 52 | } 53 | -------------------------------------------------------------------------------- /assets/js/subtitles.js: -------------------------------------------------------------------------------- 1 | const convert = require('xml-js'); 2 | 3 | let timer = 0; 4 | let text; 5 | let NowVideoId; 6 | 7 | function getText() { 8 | if (!subtitles) return TextStop(); 9 | TextStop(); 10 | text = []; 11 | let stroka = ""; 12 | let lastStroka = ""; 13 | let x = document.getElementById("snackbar"); 14 | let now = app._data.playlist[AP.getIndex()]; 15 | if (now.videoId == null) { 16 | subtitles = false; 17 | document.querySelector(`#snackbar`).style.display = "none"; 18 | document.querySelector(".subtitles").classList.remove('ap-active'); 19 | return console.log("No text"); 20 | } 21 | axios.get(`http://video.google.com/timedtext?type=track&v=${now.videoId}&id=0&lang=en`).then(res => { 22 | if(res.data == "") { 23 | document.querySelector(".subtitles").classList.remove('ap-active'); 24 | } 25 | if (res.data != false) text = JSON.parse(convert.xml2json(res.data, { compact: true, spaces: 4 })).transcript.text; 26 | if (text.length == 0) { 27 | axios.get(`http://video.google.com/timedtext?type=track&v=${now.videoId}&id=0&lang=ru`).then(res => { 28 | if (res.data != false) text = JSON.parse(convert.xml2json(res.data, { compact: true, spaces: 4 })).transcript.text; 29 | }) 30 | if (text.length == 0) { 31 | axios.get(`http://video.google.com/timedtext?type=track&v=${now.videoId}&id=0&lang=uk`).then(res => { 32 | if (res.data != false) text = JSON.parse(convert.xml2json(res.data, { compact: true, spaces: 4 })).transcript.text; 33 | }) 34 | } 35 | } 36 | NowVideoId = now.videoId; 37 | }) 38 | timer = setInterval(() => { 39 | if (text.find(a => Number(a._attributes.start).toFixed(0) == audio.currentTime.toFixed(0)) != undefined) { 40 | stroka = text.find(a => Number(a._attributes.start).toFixed(0) == audio.currentTime.toFixed(0))._text ? text.find(a => Number(a._attributes.start).toFixed(0) == audio.currentTime.toFixed(0))._text : "" ; 41 | if (!remote.getCurrentWindow().isFocused()) { 42 | require('electron').ipcRenderer.send("notification", {body: text.find(a => Number(a._attributes.start).toFixed(0) == audio.currentTime.toFixed(0))._text, img: ""}) 43 | }; 44 | } 45 | 46 | if (stroka != undefined && lastStroka != stroka) { 47 | x.innerText = stroka.split("\n").join(" ").replace(/( |<([^>]+)>)/ig, " ").replace(/[^\p{Alpha}\p{M}\p{Nd}\p{Pc}\p{Join_C} ’ " ` : - .]/gu, "").replace(/[0-9]/g, ''); 48 | lastStroka = stroka; 49 | x.classList.add("show"); 50 | animText(text.find(a => Number(a._attributes.start).toFixed(0) == audio.currentTime.toFixed(0))._attributes.dur); 51 | } 52 | 53 | 54 | }, 1000); 55 | } 56 | 57 | function TextStop() { 58 | document.getElementById("snackbar").className = document.getElementById("snackbar").className.replace("show", ""); 59 | clearTimeout(timer); 60 | timer = 0; 61 | } 62 | 63 | function animText(dur) { 64 | var s, 65 | spanizeLetters = { 66 | settings: { 67 | letters: $('.js-spanize'), 68 | }, 69 | init: function () { 70 | s = this.settings; 71 | this.bindEvents(); 72 | }, 73 | bindEvents: function () { 74 | s.letters.html(function (i, el) { 75 | //spanizeLetters.joinChars(); 76 | var spanizer = $.trim(el).split(""); 77 | return '' + spanizer.join('') + ''; 78 | }); 79 | }, 80 | }; 81 | spanizeLetters.init(); 82 | } 83 | -------------------------------------------------------------------------------- /tempNotification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | YOMP 9 | 10 | 11 | 108 | 109 | 110 | 111 |
112 |
Now playing
113 |

{{title}}

114 |
115 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /assets/js/youtube.js: -------------------------------------------------------------------------------- 1 | const DownloadYTFile = require('yt-dl-playlist') 2 | 3 | async function ffmpegSelect() { 4 | let dir = await remote.dialog.showOpenDialog({ title: 'Select ffmpeg Folder', properties: ['openDirectory'] }); 5 | if (!dir.filePaths[0]) return; 6 | fs.writeFileSync(`${root}/ffmpeg.txt`, dir.filePaths[0]); 7 | ffmpeg = fs.readFileSync(`${root}/ffmpeg.txt`).toString(); 8 | } 9 | 10 | function openYoutube() { 11 | $(".menu-left").removeClass('act-menu'); 12 | $(".shadow").hide(); 13 | document.querySelector(".youtube-choise").style.display = "flex"; 14 | setTimeout(() => { document.querySelector(".youtube-choise").classList.toggle("active"); }, 100) 15 | return; 16 | } 17 | let obj; 18 | function youtube(vid, title, icon) { 19 | if(vid.indexOf('v=') > -1) vid = vid.split(`v=`)[1].split("&")[0]; 20 | console.log(vid); 21 | if (db().query(`SELECT * from music where videoId='${vid}'`).length > 0) return notify('Error', 'Song already in playlist :3'); 22 | const downloader = new DownloadYTFile({ 23 | outputPath: `${root}/youtube/`, 24 | ffmpegPath: `${ffmpeg}/bin/ffmpeg.exe`, 25 | maxParallelDownload: 10, 26 | fileNameGenerator: (videoTitle) => { 27 | return `${videoTitle.replace(/[|&\/\\#,+()$~%.'":*?<>{}]/g, "")}.mp3` 28 | } 29 | }) 30 | downloader.download(vid); 31 | obj = {}; 32 | let load = 0; 33 | document.querySelector('.youtube-b').innerHTML = "Getting info..."; 34 | downloader.on('start', (fileInfo) => { 35 | console.log(fileInfo); 36 | notify('YouTube', `${fileInfo.ref.title} download`, false); 37 | obj = { title: `${fileInfo.ref.title.replace(/[&|\/\\#,+()$~%.'":*?<>{}]/g, "")}`, icon: `${fileInfo.ref.thumbnail.url}`, file: `${fileInfo.filePath}`, videoId: vid, loved: "false" }; 38 | }) 39 | downloader.on('video-info', (fileInfo, video) => { 40 | console.log({ fileInfo, video }) 41 | }) 42 | downloader.on('video-setting', (fileInfo, settings) => { 43 | console.log({ fileInfo, settings }) 44 | }) 45 | downloader.on('progress', (fileInfo) => { 46 | console.log(fileInfo); 47 | if (load == 0) { 48 | document.querySelector('.youtube-b').innerHTML = "Downloading."; 49 | load++; 50 | } else if (load == 1) { 51 | load++; 52 | document.querySelector('.youtube-b').innerHTML = "Downloading.."; 53 | } else if (load == 2) { 54 | document.querySelector('.youtube-b').innerHTML = "Downloading..."; 55 | load = 0; 56 | } 57 | document.querySelector('#youtube-id').value = fileInfo.ref.title; 58 | }) 59 | downloader.on('complete', (fileInfo) => { 60 | document.querySelector(".youtube-choise").classList.toggle("active"); 61 | setTimeout(() => { document.querySelector(".youtube-choise").style.display = "none"; }, 100); 62 | if (db().query(`SELECT * from music where videoId='${vid}'`).length == 0) { 63 | axios.get(obj.icon, { responseType: 'arraybuffer' }).then(response => { 64 | fs.writeFileSync(`${root}/images/${obj.videoId}.jpg`.split("\\").join("/"), Buffer.from(response.data, 'base64')); 65 | db().insert('music', { 66 | title: obj.title.replace(/[|&\/\\#,+()$~%.'":*?<>{}]/g, ""), 67 | icon: `${root}/images/${obj.videoId}.jpg`.split("\\").join("/"), 68 | file: `${root}/youtube/${fileInfo.fileName}`, 69 | videoId: obj.videoId, 70 | loved: "false" 71 | }); 72 | notify("YouTube", `Download ${obj.title} complete :3`, true); 73 | document.querySelector('#youtube-id').value = ""; 74 | document.querySelector('.youtube-b').innerHTML = "Download"; 75 | refresh(); 76 | }).catch(er => { }) 77 | }; 78 | }) 79 | downloader.on('error', (fileInfo) => console.log(fileInfo.error)) 80 | } 81 | 82 | 83 | function downloadFromSearch(id) { 84 | openYoutube(); 85 | document.querySelector('#youtube-id').value = id; 86 | youtube(id); 87 | } 88 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/svg-with-js.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | .svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa .fa-secondary,.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}.fad.fa-inverse{color:#fff} -------------------------------------------------------------------------------- /embed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | YouTube Player 9 | 10 | 11 | 70 | 71 | 72 | 73 |
74 |
75 |
76 |
77 | 90 | 94 | 96 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /assets/js/import.js: -------------------------------------------------------------------------------- 1 | const mm = require('music-metadata'); 2 | async function addMusicFolder() { 3 | let dir = await remote.dialog.showOpenDialog({ title: 'Select Music Folder', properties: ['openDirectory'] }); 4 | if (!dir.filePaths[0]) return; 5 | fs.readdir(dir.filePaths[0], function (err, items) { 6 | loadMusic(); 7 | items.forEach((i, ind) => { 8 | setTimeout(() => { 9 | if (ind + 1 == items.length) loadMusic(); 10 | if (i.toLocaleLowerCase().indexOf(".mp3") > -1) { 11 | let fiph = `${dir.filePaths[0]}/${i}`.split("\\").join("/"); 12 | if (db().query(`SELECT * from music where file='${fiph}'`).length == 0) { 13 | // let metadata = NodeID3.read(`${dir.filePaths[0]}/${i}`); 14 | mm.parseFile(`${dir.filePaths[0]}/${i}`) 15 | .then(metadata => { 16 | metadata = metadata.common; 17 | console.log(metadata) 18 | let obj = { 19 | title: i.split(".mp3").join(""), 20 | file: fiph, 21 | loved: "false" 22 | }; 23 | obj.title = obj.title.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, ""); 24 | if (metadata.picture) { 25 | fs.writeFileSync(`${root}/images/${obj.title}.jpg`, metadata.picture[0].data, 'binary'); 26 | obj.icon = encodeURI(`${root}/images/${obj.title}.jpg`); 27 | } 28 | db().insert('music', obj); 29 | document.getElementById("load-progress").innerHTML = `
${obj.title}
${ind + 1}/${items.length}`; 30 | }) 31 | .catch(err => { 32 | console.error(err.message); 33 | }); 34 | } else { 35 | document.getElementById("load-progress").innerHTML = `
${i.toLocaleLowerCase().split(".mp3")}
${ind + 1}/${items.length}`; 36 | } 37 | } 38 | }, 20 * ind) 39 | }) 40 | }); 41 | } 42 | 43 | async function addosu() { 44 | let dir = await remote.dialog.showOpenDialog({ title: 'Select osu!/songs Folder', properties: ['openDirectory'] }); 45 | if (!dir.filePaths[0]) return; 46 | fs.readdir(dir.filePaths[0], function (err, items) { 47 | checkDir(0, items, dir.filePaths[0]); 48 | notify("Success", "Start importing osu! songs, plz wait :)") 49 | }); 50 | } 51 | 52 | function checkDir(ind, mas, dir) { 53 | if (ind + 1 == mas.length) { 54 | refresh(); 55 | app.osuimport = `Import osu! songs`; 56 | notify("Success", "Importing osu! songs completed :3") 57 | } else { 58 | let i = mas[ind].split("~").join("").split("'").join("").split("^").join(""); 59 | let songFolder = i; 60 | if (i.indexOf(".") == -1) { 61 | fs.readdir(`${dir}/${i}`, function (err, files) { 62 | let iffo = `${dir}/${i}`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""); 63 | if (files && db().query(`SELECT * from music where dir='${iffo}'`).length == 0) { 64 | if (files.toString().indexOf(".osu") == -1) return checkDir(ind + 1, mas, dir); 65 | let already = false; 66 | files.forEach(f => { 67 | if (f.indexOf(".osu") > -1) { 68 | if (!already) { 69 | already = true; 70 | app.osuimport = `Importing ${ind + 1}/${mas.length}`; 71 | parseOsu(ind, mas, dir, songFolder, f, i, files); 72 | } 73 | } 74 | }) 75 | } else { checkDir(ind + 1, mas, dir); } 76 | }) 77 | } else { checkDir(ind + 1, mas, dir); } 78 | } 79 | } 80 | 81 | function parseOsu(ind, mas, dir, songFolder, f, i, files) { 82 | let info = fs.readFileSync(`${dir}\\${songFolder}\\${f}`.split("\\").join("/")).toString(), 83 | title = f.split(".osu").join(""), 84 | bmid = songFolder.split(" ")[0], 85 | full = ""; 86 | if (info.indexOf("Artist:") > -1 && info.indexOf("Title:") > -1) title = `${info.split(`Artist:`)[1].split("\n")[0]} - ${info.split(`Title:`)[1].split("\n")[0]}`.replace(/(\r\n|\n|\r)/gm, ""); 87 | if (info.indexOf("BeatmapSetID") > -1) bmid = info.split(`BeatmapSetID:`)[1].split("\n")[0]; 88 | files.forEach(img => { if (img.indexOf(".jpg") > -1 || img.indexOf(".png") > -1) { full = img; } }); 89 | if (info.indexOf("AudioFilename: ") > -1) { 90 | let obj = { bmid: bmid, title: title.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, ""), icon: `${root}/images/${bmid}.jpg`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""), file: `${dir}/${songFolder}/${info.split(`AudioFilename: `)[1].split("\n")[0]}`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""), dir: `${dir}/${i}`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""), full: `${dir}/${songFolder}/${full}`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""), loved: "false" }; 91 | saveOsu(obj, mas, dir, bmid, ind, i); 92 | } else { checkDir(ind + 1, mas, dir); } 93 | } 94 | 95 | function saveOsu(obj, mas, dir, bmid, ind) { 96 | if (db().query(`SELECT * from music where dir='${obj.dir}'`).length == 0) { 97 | axios.get(`https://assets.ppy.sh/beatmaps/${bmid}/covers/card.jpg`, { responseType: 'arraybuffer', validateStatus: false }).then(response => { 98 | fs.writeFileSync(`${root}/images/${bmid}.jpg`.split("\\").join("/").replace(/(\r\n|\n|\r)/gm, ""), Buffer.from(response.data, 'base64')); 99 | db().insert('music', obj); 100 | checkDir(ind + 1, mas, dir); 101 | }).catch(er => { 102 | checkDir(ind + 1, mas, dir); 103 | }) 104 | } else { checkDir(ind + 1, mas, dir); } 105 | } 106 | 107 | function loadMusic() { 108 | if (document.getElementById('load-music').style.display == "" || document.getElementById('load-music').style.display == "none") { 109 | document.getElementsByClassName('menu-left')[0].classList.remove('act-menu'); 110 | document.getElementsByClassName('shadow')[0].style.display = "none"; 111 | document.getElementById('pl').style.display = "none"; 112 | document.getElementById('ap').style.display = "none"; 113 | document.querySelector(".radio-choise").style.display = "none"; 114 | document.getElementById("settings").classList.remove("openSettings"); 115 | document.getElementById('load-music').style.display = "block"; 116 | document.getElementById('yomp').style.background = "var(--bg)"; 117 | document.getElementsByClassName('main')[0].style.height = "35px"; 118 | document.getElementsByClassName('maximize')[0].style.opacity = "0"; 119 | document.getElementsByClassName('minimize')[0].style.opacity = "0"; 120 | remote.getCurrentWindow().setSize(500, 91); 121 | remote.getCurrentWindow().center(); 122 | } else { 123 | refresh(); 124 | remote.getCurrentWindow().focus(); 125 | document.getElementById('pl').style.display = null; 126 | document.getElementById('ap').style.display = null; 127 | document.getElementById('load-music').style.display = null; 128 | document.querySelector(".radio-choise").style.display = null; 129 | document.getElementById('yomp').style.background = null; 130 | document.getElementsByClassName('main')[0].style.height = null; 131 | document.getElementsByClassName('maximize')[0].style.opacity = null; 132 | document.getElementsByClassName('minimize')[0].style.opacity = null; 133 | remote.getCurrentWindow().setSize(1000, 700); 134 | remote.getCurrentWindow().center(); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /assets/js/settings.js: -------------------------------------------------------------------------------- 1 | function clearDir(path) { 2 | if (fs.existsSync(path)) { 3 | fs.readdirSync(path).forEach(function (file, index) { 4 | let curPath = path + "/" + file; 5 | if (fs.lstatSync(curPath).isDirectory()) { deleteFolderRecursive(curPath); } else { fs.unlinkSync(curPath); } 6 | }); 7 | } 8 | }; 9 | 10 | function clearPl() { 11 | M.toast({ html: 'Playlist cleared' }); 12 | clearDir(`${root}/images`); 13 | clearDir(`${root}/full`); 14 | clearDir(`${root}/youtube`); 15 | db().run("DROP TABLE music"); 16 | db().run("DROP TABLE status"); 17 | db().run(`CREATE TABLE IF NOT EXISTS music(id INTEGER PRIMARY KEY, title VARCHAR(150), bmid VARCHAR(150), category VARCHAR(150), dir VARCHAR(150) , file VARCHAR(999) , icon VARCHAR(150) , full VARCHAR(150) , loved BOOLEAN , videoId VARCHAR(11));`); 18 | db().run(`CREATE TABLE IF NOT EXISTS status(dataId INTEGER, realId INTEGER, volume INTEGER, loved VARCHAR(5));`); 19 | db().run(`CREATE TABLE IF NOT EXISTS settings( notiturn VARCHAR(5),notiloved VARCHAR(5) ,notiadd VARCHAR(5) ,keyplay VARCHAR(99) ,keyrandom VARCHAR(99) ,keylove VARCHAR(99) ,keynext VARCHAR(99) ,keyprev VARCHAR(99) ,keyfocus VARCHAR(99) ,keymini VARCHAR(99) ,keyvolumeup VARCHAR(99) ,keyvolumedown VARCHAR(99) ,keymute VARCHAR(99));`); 20 | db().run(`INSERT INTO settings(notiturn,notiloved,notiadd,keyplay,keyrandom,keylove,keynext,keyprev,keyfocus,keymini,keyvolumeup,keyvolumedown,keymute) VALUES('false','false','false','ctrl+Space','ctrl+r','ctrl+l','ctrl+Right','ctrl+Left','ctrl+Up','ctrl+Down','ctrl+=','ctrl+-','ctrl+0');`); 21 | db().run(`INSERT INTO status(dataId,realId,volume,loved) VALUES(0, 0, 0.1, false);`); 22 | refresh(); 23 | remote.app.relaunch(); 24 | remote.app.exit(); 25 | } 26 | 27 | function setsSave() { 28 | db().run("DROP TABLE settings"); 29 | db().run(`CREATE TABLE IF NOT EXISTS settings( notiturn VARCHAR(5),notiloved VARCHAR(5) ,notiadd VARCHAR(5) ,keyplay VARCHAR(99) ,keyrandom VARCHAR(99) ,keylove VARCHAR(99) ,keynext VARCHAR(99) ,keyprev VARCHAR(99) ,keyfocus VARCHAR(99) ,keymini VARCHAR(99) ,keyvolumeup VARCHAR(99) ,keyvolumedown VARCHAR(99) ,keymute VARCHAR(99));`); 30 | db().run(`INSERT INTO settings(notiturn,notiloved,notiadd,keyplay,keyrandom,keylove,keynext,keyprev,keyfocus,keymini,keyvolumeup,keyvolumedown,keymute) VALUES('${document.getElementById('noti-turn').checked}','${document.getElementById('noti-loved').checked}','${document.getElementById('noti-youtube').checked}','${document.getElementById('key-toggle').value}','${document.getElementById('key-random').value}','${document.getElementById('key-love').value}','${document.getElementById('key-next').value}','${document.getElementById('key-prev').value}','${document.getElementById('key-minioff').value}','${document.getElementById('key-mini').value}','${document.getElementById('key-volup').value}','${document.getElementById('key-voldown').value}','${document.getElementById('key-mute').value}');`); 31 | remote.app.relaunch(); 32 | remote.app.exit(); 33 | } 34 | 35 | function setsToggle() { 36 | if(document.querySelector(`#settings`).style.display == "block") { 37 | $("#settings").toggleClass('openmodal'); 38 | $(".menu-left").removeClass('act-menu'); 39 | $(".shadow").hide(); 40 | setTimeout(() => { 41 | document.querySelector(`#settings`).style.display = "none"; 42 | }, 500) 43 | } else { 44 | document.querySelector(`#settings`).style.display = "block"; 45 | setTimeout(() => { 46 | $("#settings").toggleClass('openmodal'); 47 | $(".menu-left").removeClass('act-menu'); 48 | $(".shadow").hide(); 49 | }, 100) 50 | } 51 | } 52 | 53 | function infoToggle() { 54 | if(document.querySelector(`#info`).style.display == "block") { 55 | $("#info").toggleClass('openmodal'); 56 | $(".menu-left").removeClass('act-menu'); 57 | $(".shadow").hide(); 58 | setTimeout(() => { 59 | document.querySelector(`#info`).style.display = "none"; 60 | }, 500) 61 | } else { 62 | document.querySelector(`#info`).style.display = "block"; 63 | setTimeout(() => { 64 | $("#info").toggleClass('openmodal'); 65 | $(".menu-left").removeClass('act-menu'); 66 | $(".shadow").hide(); 67 | }, 100) 68 | } 69 | } 70 | 71 | 72 | function offKey(el) { document.getElementById(el.getAttribute('dlya')).value = ""; } 73 | 74 | for (let i = 0; i < document.getElementsByClassName('input-keys').length; i++) { 75 | document.getElementsByClassName('input-keys')[i].onkeyup = function (evt) { 76 | document.getElementsByClassName('check-key-input')[i].checked = false; 77 | if (evt.keyCode == 16) return; 78 | if (evt.key == "ArrowUp") { 79 | document.getElementsByClassName('input-keys')[i].value = "ctrl+Up"; 80 | } else if (evt.key == "ArrowDown") { 81 | document.getElementsByClassName('input-keys')[i].value = "ctrl+Down"; 82 | } else if (evt.key == "ArrowLeft") { 83 | document.getElementsByClassName('input-keys')[i].value = "ctrl+Left"; 84 | } else if (evt.key == "ArrowRight") { 85 | document.getElementsByClassName('input-keys')[i].value = "ctrl+Right"; 86 | } else if (evt.keyCode == 32) { 87 | document.getElementsByClassName('input-keys')[i].value = "ctrl+Space"; 88 | } else { 89 | document.getElementsByClassName('input-keys')[i].value = "ctrl+" + evt.key; 90 | } 91 | } 92 | } 93 | 94 | function loadSettings() { 95 | if (db().query("select * from settings")[0].notiturn == "true") document.getElementById('noti-turn').checked = true; 96 | if (db().query("select * from settings")[0].notiloved == "true") document.getElementById('noti-loved').checked = true; 97 | if (db().query("select * from settings")[0].notiadd == "true") document.getElementById('noti-youtube').checked = true; 98 | if (db().query("select * from settings")[0].keyplay == "") document.getElementsByClassName('check-key-input')[0].checked = true; 99 | if (db().query("select * from settings")[0].keynext == "") document.getElementsByClassName('check-key-input')[1].checked = true; 100 | if (db().query("select * from settings")[0].keyprev == "") document.getElementsByClassName('check-key-input')[2].checked = true; 101 | if (db().query("select * from settings")[0].keyrandom == "") document.getElementsByClassName('check-key-input')[3].checked = true; 102 | if (db().query("select * from settings")[0].keyvolumeup == "") document.getElementsByClassName('check-key-input')[4].checked = true; 103 | if (db().query("select * from settings")[0].keyvolumedown == "") document.getElementsByClassName('check-key-input')[5].checked = true; 104 | if (db().query("select * from settings")[0].keymute == "") document.getElementsByClassName('check-key-input')[6].checked = true; 105 | if (db().query("select * from settings")[0].keylove == "") document.getElementsByClassName('check-key-input')[7].checked = true; 106 | if (db().query("select * from settings")[0].keymini == "") document.getElementsByClassName('check-key-input')[8].checked = true; 107 | if (db().query("select * from settings")[0].keyfocus == "") document.getElementsByClassName('check-key-input')[9].checked = true; 108 | document.getElementById('key-toggle').value = db().query("select * from settings")[0].keyplay; 109 | document.getElementById('key-next').value = db().query("select * from settings")[0].keynext; 110 | document.getElementById('key-prev').value = db().query("select * from settings")[0].keyprev; 111 | document.getElementById('key-random').value = db().query("select * from settings")[0].keyrandom; 112 | document.getElementById('key-volup').value = db().query("select * from settings")[0].keyvolumeup; 113 | document.getElementById('key-voldown').value = db().query("select * from settings")[0].keyvolumedown; 114 | document.getElementById('key-mute').value = db().query("select * from settings")[0].keymute; 115 | document.getElementById('key-love').value = db().query("select * from settings")[0].keylove; 116 | document.getElementById('key-mini').value = db().query("select * from settings")[0].keymini; 117 | document.getElementById('key-minioff').value = db().query("select * from settings")[0].keyfocus; 118 | } 119 | -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/svg-with-js.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | svg:not(:root).svg-inline--fa { 6 | overflow: visible; } 7 | 8 | .svg-inline--fa { 9 | display: inline-block; 10 | font-size: inherit; 11 | height: 1em; 12 | overflow: visible; 13 | vertical-align: -.125em; } 14 | .svg-inline--fa.fa-lg { 15 | vertical-align: -.225em; } 16 | .svg-inline--fa.fa-w-1 { 17 | width: 0.0625em; } 18 | .svg-inline--fa.fa-w-2 { 19 | width: 0.125em; } 20 | .svg-inline--fa.fa-w-3 { 21 | width: 0.1875em; } 22 | .svg-inline--fa.fa-w-4 { 23 | width: 0.25em; } 24 | .svg-inline--fa.fa-w-5 { 25 | width: 0.3125em; } 26 | .svg-inline--fa.fa-w-6 { 27 | width: 0.375em; } 28 | .svg-inline--fa.fa-w-7 { 29 | width: 0.4375em; } 30 | .svg-inline--fa.fa-w-8 { 31 | width: 0.5em; } 32 | .svg-inline--fa.fa-w-9 { 33 | width: 0.5625em; } 34 | .svg-inline--fa.fa-w-10 { 35 | width: 0.625em; } 36 | .svg-inline--fa.fa-w-11 { 37 | width: 0.6875em; } 38 | .svg-inline--fa.fa-w-12 { 39 | width: 0.75em; } 40 | .svg-inline--fa.fa-w-13 { 41 | width: 0.8125em; } 42 | .svg-inline--fa.fa-w-14 { 43 | width: 0.875em; } 44 | .svg-inline--fa.fa-w-15 { 45 | width: 0.9375em; } 46 | .svg-inline--fa.fa-w-16 { 47 | width: 1em; } 48 | .svg-inline--fa.fa-w-17 { 49 | width: 1.0625em; } 50 | .svg-inline--fa.fa-w-18 { 51 | width: 1.125em; } 52 | .svg-inline--fa.fa-w-19 { 53 | width: 1.1875em; } 54 | .svg-inline--fa.fa-w-20 { 55 | width: 1.25em; } 56 | .svg-inline--fa.fa-pull-left { 57 | margin-right: .3em; 58 | width: auto; } 59 | .svg-inline--fa.fa-pull-right { 60 | margin-left: .3em; 61 | width: auto; } 62 | .svg-inline--fa.fa-border { 63 | height: 1.5em; } 64 | .svg-inline--fa.fa-li { 65 | width: 2em; } 66 | .svg-inline--fa.fa-fw { 67 | width: 1.25em; } 68 | 69 | .fa-layers svg.svg-inline--fa { 70 | bottom: 0; 71 | left: 0; 72 | margin: auto; 73 | position: absolute; 74 | right: 0; 75 | top: 0; } 76 | 77 | .fa-layers { 78 | display: inline-block; 79 | height: 1em; 80 | position: relative; 81 | text-align: center; 82 | vertical-align: -.125em; 83 | width: 1em; } 84 | .fa-layers svg.svg-inline--fa { 85 | -webkit-transform-origin: center center; 86 | transform-origin: center center; } 87 | 88 | .fa-layers-text, .fa-layers-counter { 89 | display: inline-block; 90 | position: absolute; 91 | text-align: center; } 92 | 93 | .fa-layers-text { 94 | left: 50%; 95 | top: 50%; 96 | -webkit-transform: translate(-50%, -50%); 97 | transform: translate(-50%, -50%); 98 | -webkit-transform-origin: center center; 99 | transform-origin: center center; } 100 | 101 | .fa-layers-counter { 102 | background-color: #ff253a; 103 | border-radius: 1em; 104 | -webkit-box-sizing: border-box; 105 | box-sizing: border-box; 106 | color: #fff; 107 | height: 1.5em; 108 | line-height: 1; 109 | max-width: 5em; 110 | min-width: 1.5em; 111 | overflow: hidden; 112 | padding: .25em; 113 | right: 0; 114 | text-overflow: ellipsis; 115 | top: 0; 116 | -webkit-transform: scale(0.25); 117 | transform: scale(0.25); 118 | -webkit-transform-origin: top right; 119 | transform-origin: top right; } 120 | 121 | .fa-layers-bottom-right { 122 | bottom: 0; 123 | right: 0; 124 | top: auto; 125 | -webkit-transform: scale(0.25); 126 | transform: scale(0.25); 127 | -webkit-transform-origin: bottom right; 128 | transform-origin: bottom right; } 129 | 130 | .fa-layers-bottom-left { 131 | bottom: 0; 132 | left: 0; 133 | right: auto; 134 | top: auto; 135 | -webkit-transform: scale(0.25); 136 | transform: scale(0.25); 137 | -webkit-transform-origin: bottom left; 138 | transform-origin: bottom left; } 139 | 140 | .fa-layers-top-right { 141 | right: 0; 142 | top: 0; 143 | -webkit-transform: scale(0.25); 144 | transform: scale(0.25); 145 | -webkit-transform-origin: top right; 146 | transform-origin: top right; } 147 | 148 | .fa-layers-top-left { 149 | left: 0; 150 | right: auto; 151 | top: 0; 152 | -webkit-transform: scale(0.25); 153 | transform: scale(0.25); 154 | -webkit-transform-origin: top left; 155 | transform-origin: top left; } 156 | 157 | .fa-lg { 158 | font-size: 1.33333em; 159 | line-height: 0.75em; 160 | vertical-align: -.0667em; } 161 | 162 | .fa-xs { 163 | font-size: .75em; } 164 | 165 | .fa-sm { 166 | font-size: .875em; } 167 | 168 | .fa-1x { 169 | font-size: 1em; } 170 | 171 | .fa-2x { 172 | font-size: 2em; } 173 | 174 | .fa-3x { 175 | font-size: 3em; } 176 | 177 | .fa-4x { 178 | font-size: 4em; } 179 | 180 | .fa-5x { 181 | font-size: 5em; } 182 | 183 | .fa-6x { 184 | font-size: 6em; } 185 | 186 | .fa-7x { 187 | font-size: 7em; } 188 | 189 | .fa-8x { 190 | font-size: 8em; } 191 | 192 | .fa-9x { 193 | font-size: 9em; } 194 | 195 | .fa-10x { 196 | font-size: 10em; } 197 | 198 | .fa-fw { 199 | text-align: center; 200 | width: 1.25em; } 201 | 202 | .fa-ul { 203 | list-style-type: none; 204 | margin-left: 2.5em; 205 | padding-left: 0; } 206 | .fa-ul > li { 207 | position: relative; } 208 | 209 | .fa-li { 210 | left: -2em; 211 | position: absolute; 212 | text-align: center; 213 | width: 2em; 214 | line-height: inherit; } 215 | 216 | .fa-border { 217 | border: solid 0.08em #eee; 218 | border-radius: .1em; 219 | padding: .2em .25em .15em; } 220 | 221 | .fa-pull-left { 222 | float: left; } 223 | 224 | .fa-pull-right { 225 | float: right; } 226 | 227 | .fa.fa-pull-left, 228 | .fas.fa-pull-left, 229 | .far.fa-pull-left, 230 | .fal.fa-pull-left, 231 | .fab.fa-pull-left { 232 | margin-right: .3em; } 233 | 234 | .fa.fa-pull-right, 235 | .fas.fa-pull-right, 236 | .far.fa-pull-right, 237 | .fal.fa-pull-right, 238 | .fab.fa-pull-right { 239 | margin-left: .3em; } 240 | 241 | .fa-spin { 242 | -webkit-animation: fa-spin 2s infinite linear; 243 | animation: fa-spin 2s infinite linear; } 244 | 245 | .fa-pulse { 246 | -webkit-animation: fa-spin 1s infinite steps(8); 247 | animation: fa-spin 1s infinite steps(8); } 248 | 249 | @-webkit-keyframes fa-spin { 250 | 0% { 251 | -webkit-transform: rotate(0deg); 252 | transform: rotate(0deg); } 253 | 100% { 254 | -webkit-transform: rotate(360deg); 255 | transform: rotate(360deg); } } 256 | 257 | @keyframes fa-spin { 258 | 0% { 259 | -webkit-transform: rotate(0deg); 260 | transform: rotate(0deg); } 261 | 100% { 262 | -webkit-transform: rotate(360deg); 263 | transform: rotate(360deg); } } 264 | 265 | .fa-rotate-90 { 266 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; 267 | -webkit-transform: rotate(90deg); 268 | transform: rotate(90deg); } 269 | 270 | .fa-rotate-180 { 271 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; 272 | -webkit-transform: rotate(180deg); 273 | transform: rotate(180deg); } 274 | 275 | .fa-rotate-270 { 276 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; 277 | -webkit-transform: rotate(270deg); 278 | transform: rotate(270deg); } 279 | 280 | .fa-flip-horizontal { 281 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; 282 | -webkit-transform: scale(-1, 1); 283 | transform: scale(-1, 1); } 284 | 285 | .fa-flip-vertical { 286 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; 287 | -webkit-transform: scale(1, -1); 288 | transform: scale(1, -1); } 289 | 290 | .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { 291 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; 292 | -webkit-transform: scale(-1, -1); 293 | transform: scale(-1, -1); } 294 | 295 | :root .fa-rotate-90, 296 | :root .fa-rotate-180, 297 | :root .fa-rotate-270, 298 | :root .fa-flip-horizontal, 299 | :root .fa-flip-vertical, 300 | :root .fa-flip-both { 301 | -webkit-filter: none; 302 | filter: none; } 303 | 304 | .fa-stack { 305 | display: inline-block; 306 | height: 2em; 307 | position: relative; 308 | width: 2.5em; } 309 | 310 | .fa-stack-1x, 311 | .fa-stack-2x { 312 | bottom: 0; 313 | left: 0; 314 | margin: auto; 315 | position: absolute; 316 | right: 0; 317 | top: 0; } 318 | 319 | .svg-inline--fa.fa-stack-1x { 320 | height: 1em; 321 | width: 1.25em; } 322 | 323 | .svg-inline--fa.fa-stack-2x { 324 | height: 2em; 325 | width: 2.5em; } 326 | 327 | .fa-inverse { 328 | color: #fff; } 329 | 330 | .sr-only { 331 | border: 0; 332 | clip: rect(0, 0, 0, 0); 333 | height: 1px; 334 | margin: -1px; 335 | overflow: hidden; 336 | padding: 0; 337 | position: absolute; 338 | width: 1px; } 339 | 340 | .sr-only-focusable:active, .sr-only-focusable:focus { 341 | clip: auto; 342 | height: auto; 343 | margin: 0; 344 | overflow: visible; 345 | position: static; 346 | width: auto; } 347 | 348 | .svg-inline--fa .fa-primary { 349 | fill: var(--fa-primary-color, currentColor); 350 | opacity: 1; 351 | opacity: var(--fa-primary-opacity, 1); } 352 | 353 | .svg-inline--fa .fa-secondary { 354 | fill: var(--fa-secondary-color, currentColor); 355 | opacity: 0.4; 356 | opacity: var(--fa-secondary-opacity, 0.4); } 357 | 358 | .svg-inline--fa.fa-swap-opacity .fa-primary { 359 | opacity: 0.4; 360 | opacity: var(--fa-secondary-opacity, 0.4); } 361 | 362 | .svg-inline--fa.fa-swap-opacity .fa-secondary { 363 | opacity: 1; 364 | opacity: var(--fa-primary-opacity, 1); } 365 | 366 | .svg-inline--fa mask .fa-primary, 367 | .svg-inline--fa mask .fa-secondary { 368 | fill: black; } 369 | 370 | .fad.fa-inverse { 371 | color: #fff; } 372 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow, Tray, Menu, globalShortcut, ipcMain: ipc } = require('electron'), 2 | path = require('path'), 3 | root = app.getPath('userData'), 4 | DiscordRPC = require('discord-rpc'), 5 | iconPath = path.join(__dirname, 'assets/icons/icon.png'), 6 | db = require('better-sqlite3-helper'), 7 | fs = require('fs'); 8 | 9 | let mainWindow, 10 | notiWindow, 11 | preloader, 12 | rpc = new DiscordRPC.Client({ transport: 'ipc' }), 13 | embedWindow, 14 | appIcon = null, 15 | s = { keyplay: `ctrl+Space`, keyrandom: `ctrl+r`, keylove: `ctrl+l`, keynext: `ctrl+Right`, keyprev: `ctrl+Left`, keyfocus: `ctrl+Up`, keymini: `ctrl+Down`, keyvolumeup: `ctrl+=`, keyvolumedown: `ctrl+-`, keymute: `ctrl+-` }; 16 | 17 | if (fs.existsSync(`${root}/database.db`)) { 18 | db({ path: `${root}/database.db`, memory: false, readonly: false, fileMustExist: false, migrate: false }); 19 | s = db().query(`SELECT * from settings`)[0]; 20 | } else { 21 | db({ path: `${root}/database.db`, memory: false, readonly: false, fileMustExist: false, migrate: false }); 22 | db().run(`CREATE TABLE IF NOT EXISTS music(id INTEGER PRIMARY KEY, title VARCHAR(150), bmid VARCHAR(150), category VARCHAR(150), dir VARCHAR(150) , file VARCHAR(999) , icon VARCHAR(150) , full VARCHAR(150) , loved BOOLEAN , videoId VARCHAR(11));`); 23 | db().run(`CREATE TABLE IF NOT EXISTS status(dataId INTEGER, realId INTEGER, volume INTEGER, loved VARCHAR(5));`); 24 | db().run(`CREATE TABLE IF NOT EXISTS settings( notiturn VARCHAR(5),notiloved VARCHAR(5) ,notiadd VARCHAR(5) ,keyplay VARCHAR(99) ,keyrandom VARCHAR(99) ,keylove VARCHAR(99) ,keynext VARCHAR(99) ,keyprev VARCHAR(99) ,keyfocus VARCHAR(99) ,keymini VARCHAR(99) ,keyvolumeup VARCHAR(99) ,keyvolumedown VARCHAR(99) ,keymute VARCHAR(99));`); 25 | db().run(`INSERT INTO settings(notiturn,notiloved,notiadd,keyplay,keyrandom,keylove,keynext,keyprev,keyfocus,keymini,keyvolumeup,keyvolumedown,keymute) VALUES('false','false','false','ctrl+Space','ctrl+r','ctrl+l','ctrl+Right','ctrl+Left','ctrl+Up','ctrl+Down','ctrl+=','ctrl+-','ctrl+0');`); 26 | db().run(`INSERT INTO status(dataId,realId,volume,loved) VALUES(0, 0, 0.1, false);`); 27 | } 28 | 29 | app.setAppUserModelId("YOMP"); 30 | function createWindow() { 31 | preloader = new BrowserWindow({ 32 | show: true, transparent: true, frame: false, width: 250, height: 300, minWidth: 250, icon: "icon.png" 33 | }); 34 | preloader.loadFile('preloader.html'); 35 | 36 | mainWindow = new BrowserWindow({ 37 | show: false, transparent: true, frame: false, width: 1000, height: 700, minWidth: 400, icon: "icon.png", webPreferences: { nodeIntegration: true } 38 | }); 39 | mainWindow.loadFile('index.html'); 40 | mainWindow.on('closed', function () { 41 | mainWindow = null; 42 | }); 43 | mainWindow.on('minimize', function (event) { 44 | mainWindow.minimize(); 45 | }); 46 | 47 | let webContents = mainWindow.webContents; 48 | webContents.on('did-finish-load', () => { 49 | webContents.setZoomFactor(1); 50 | webContents.setVisualZoomLevelLimits(1, 1); 51 | webContents.setLayoutZoomLevelLimits(0, 0); 52 | }); 53 | 54 | mainWindow.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures) => { 55 | event.preventDefault(); 56 | Object.assign(options, { 57 | modal: true, 58 | parent: mainWindow, 59 | frame: true, 60 | width: 600, 61 | height: 480 62 | }) 63 | event.newGuest = new BrowserWindow(options) 64 | event.newGuest.loadURL(url); 65 | }) 66 | 67 | appIcon = new Tray(iconPath); 68 | var contextMenu = Menu.buildFromTemplate([ 69 | { label: 'Play/Pause', click: function () { mainWindow.webContents.executeJavaScript(`AP.playToggle();`); } }, 70 | { label: 'Mini mode', click: function () { mainWindow.webContents.executeJavaScript(`miniPlayer();`); } }, 71 | { label: 'Random', click: function () { mainWindow.webContents.executeJavaScript(`AP.random();`); } }, 72 | { label: 'Next track', click: function () { mainWindow.webContents.executeJavaScript(`AP.next();`); } }, 73 | { label: 'Prev track', click: function () { mainWindow.webContents.executeJavaScript(`AP.prev();`); } }, 74 | { 75 | label: 'Quit', click: function () { 76 | mainWindow.close(); 77 | if (embedWindow) embedWindow.close(); 78 | if(embedWindow) embedWindow = null; 79 | } 80 | } 81 | ]); 82 | appIcon.setToolTip('YT music player'); 83 | appIcon.on('click', () => { 84 | if (mainWindow.isFocused()) { 85 | mainWindow.hide(); 86 | } else { 87 | mainWindow.webContents.executeJavaScript("miniPlayerOff();"); 88 | mainWindow.show(); 89 | } 90 | }); 91 | appIcon.setContextMenu(contextMenu); 92 | 93 | if (s.keyplay != "") globalShortcut.register(s.keyplay, () => { mainWindow.webContents.executeJavaScript(`AP.playToggle();`); }); 94 | if (s.keynext != "") globalShortcut.register(s.keynext, () => { mainWindow.webContents.executeJavaScript(`AP.next();`); }); 95 | if (s.keyvolumedown != "") globalShortcut.register(s.keyvolumedown, () => { mainWindow.webContents.executeJavaScript(`AP.volumeDown()`); }); 96 | if (s.keyvolumeup != "") globalShortcut.register(s.keyvolumeup, () => { mainWindow.webContents.executeJavaScript(`AP.volumeUp()`); }); 97 | if (s.keyrandom != "") globalShortcut.register(s.keyrandom, () => { mainWindow.webContents.executeJavaScript(`AP.random();`); }); 98 | if (s.keymute != "") globalShortcut.register(s.keymute, () => { mainWindow.webContents.executeJavaScript(`AP.mute();`); }); 99 | if (s.keylove != "") globalShortcut.register(s.keylove, () => { mainWindow.webContents.executeJavaScript(`lovethis();`); }); 100 | if (s.keyprev != "") globalShortcut.register(s.keyprev, () => { mainWindow.webContents.executeJavaScript(`AP.prev();`); }); 101 | if (s.keymini != "") globalShortcut.register(s.keymini, () => { mainWindow.show(); mainWindow.webContents.executeJavaScript('miniPlayer();'); }); 102 | if (s.keyfocus != "") globalShortcut.register(s.keyfocus, () => { mainWindow.show(); mainWindow.webContents.executeJavaScript(`miniPlayerOff();`); }); 103 | } 104 | app.on('ready', createWindow); 105 | 106 | app.on('window-all-closed', function () { 107 | if (process.platform !== 'darwin') { 108 | if (embedWindow) embedWindow.close(); 109 | if (embedWindow) embedWindow = null; 110 | app.quit(); 111 | } 112 | }); 113 | 114 | app.on('will-quit', () => { 115 | globalShortcut.unregisterAll(); 116 | }); 117 | 118 | app.on('activate', function () { 119 | if (mainWindow === null) { 120 | createWindow(); 121 | } 122 | }); 123 | 124 | ipc.on("ready", (event, arg) => { 125 | if (preloader) preloader.close(); 126 | preloader = null; 127 | mainWindow.show(); 128 | }); 129 | 130 | let notifTimer; 131 | 132 | ipc.on("notification", (event, arg) => { 133 | let html = ` YOMP
Now playing

{{title}}

`; 134 | if(arg.body == undefined || arg.img == undefined) return; 135 | fs.writeFileSync(`${root}/notification.html`, html.split("{{title}}").join(arg.body.toString()).split("{{img}}").join(arg.img.toString())) 136 | if (!notiWindow) { 137 | var mainScreen = require('electron').screen.getPrimaryDisplay().workAreaSize; 138 | notiWindow = new BrowserWindow({ 139 | alwaysOnTop: true, focusable: false, resizable: false, x: 0, y: 0, transparent: true, frame: false, width: 360, height: 120, webPreferences: { nodeIntegration: true } 140 | }); 141 | notiWindow.setIgnoreMouseEvents(true) 142 | notiWindow.loadFile(`${root}/notification.html`); 143 | clearTimeout(notifTimer); 144 | notifTimer = setTimeout(() => { 145 | if (notiWindow) notiWindow.close(); 146 | notiWindow = null; 147 | }, 3000) 148 | } else { 149 | notiWindow.loadFile(`${root}/notification.html`); 150 | clearTimeout(notifTimer); 151 | notifTimer = setTimeout(() => { 152 | if (notiWindow) notiWindow.close(); 153 | notiWindow = null; 154 | }, 3000) 155 | } 156 | }) 157 | 158 | ipc.on("embed", (event, arg) => { 159 | if (!embedWindow) { 160 | var mainScreen = require('electron').screen.getPrimaryDisplay().workAreaSize; 161 | embedWindow = new BrowserWindow({ 162 | x: mainScreen.width - 365, y: mainScreen.height - 210, transparent: true, frame: false, width: 355, height: 200, webPreferences: { nodeIntegration: true } 163 | }); 164 | embedWindow.loadFile('embed.html'); 165 | 166 | embedWindow.on('closed', function(){ 167 | embedWindow = null; 168 | if(mainWindow) mainWindow.webContents.executeJavaScript("AP.videoOff();"); 169 | }); 170 | } else { 171 | if (embedWindow) embedWindow.close(); 172 | if (embedWindow) embedWindow = null; 173 | mainWindow.webContents.executeJavaScript("AP.videoOff();"); 174 | } 175 | }) 176 | 177 | function createActivity(data) { 178 | let act = {}; 179 | appIcon.setToolTip(data.title); 180 | if (data.title == "") { 181 | act = { details: "Idle", state: "Chill", largeImageKey: "icon", largeImageText: "YOMP", smallImageKey: "stop", smallImageText: "┬┴┬┴┤( ͡° ͜ʖ├┬┴┬┴" }; 182 | return act; 183 | } 184 | if (data.status == "playing") { 185 | act = { details: "Listen music", state: data.title, largeImageKey: "icon", largeImageText: "YOMP", smallImageKey: "play", smallImageText: data.progress }; 186 | } else if (data.status == "paused") { 187 | act = { details: "Paused", state: data.title, largeImageKey: "icon", largeImageText: "YOMP", smallImageKey: "stop", smallImageText: data.progress }; 188 | } 189 | return act; 190 | } 191 | 192 | DiscordLogin(); 193 | function DiscordLogin() { 194 | rpc = new DiscordRPC.Client({ transport: 'ipc' }); 195 | rpc.login({ clientId: "555381698192474133" }).catch(er => { 196 | console.log('Reconnect to Discord!'); 197 | setTimeout(() => { 198 | DiscordLogin(); 199 | }, 5000) 200 | }); 201 | } 202 | 203 | ipc.on("rpc", (event, data) => { 204 | if (!data) return; 205 | mainWindow.webContents.executeJavaScript(``); 206 | let activity = createActivity(data); 207 | rpc.setActivity(activity).then((data) => { 208 | // mainWindow.webContents.executeJavaScript(`console.log('${JSON.stringify(data)}');`); 209 | }).catch((err) => { }); 210 | }); 211 | 212 | ipc.on("kek", (a) => { 213 | app.exit(0); 214 | }); 215 | -------------------------------------------------------------------------------- /assets/modules/axios.js: -------------------------------------------------------------------------------- 1 | /* axios v0.19.0 | (c) 2019 by Matt Zabriskie */ 2 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(5),a=n(22),u=n(11),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===j.call(e)}function o(e){return"[object ArrayBuffer]"===j.call(e)}function s(e){return"undefined"!=typeof FormData&&e instanceof FormData}function i(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function a(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===j.call(e)}function d(e){return"[object File]"===j.call(e)}function l(e){return"[object Blob]"===j.call(e)}function h(e){return"[object Function]"===j.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n 6 | * @license MIT 7 | */ 8 | e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var o=n(2),s=n(6),i=n(7),a=n(8),u=n(22);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(o.isURLSearchParams(t))s=t.toString();else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),s=i.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),s=n(9),i=n(10),a=n(11),u=n(20),c=n(21);e.exports=function(e){r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return r(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?e=n(13):"undefined"!=typeof XMLHttpRequest&&(e=n(13)),e}var s=n(2),i=n(12),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(14),s=n(6),i=n(17),a=n(18),u=n(15);e.exports=function(e){return new Promise(function(t,c){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(l+":"+h)}if(d.open(e.method.toUpperCase(),s(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?i(d.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?d.response:d.responseText,s={data:r,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,c,s),d=null}},d.onabort=function(){d&&(c(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(19),y=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){"undefined"==typeof f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(16);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(["headers","auth","proxy"],function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); 9 | //# sourceMappingURL=axios.min.map -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | YOMP 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
21 |
Music Player
22 |
23 | 28 | 30 | 36 |
37 |
38 |
39 | 40 |
41 | 42 | 48 |
49 |
50 | 114 |
115 |
    116 | 137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
Link to stream
145 |
146 |
148 |
149 |
150 |
151 |
152 |
Link to video
153 |
154 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | 163 | 168 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 | 192 |
193 |
194 |
195 |
196 |
197 |
198 | 199 | 200 | 201 |
202 |
203 |
204 |
205 |
206 |
207 | 272 | 429 |
430 |
431 |
432 |
433 | 439 | 440 | 441 | 442 | 443 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | -------------------------------------------------------------------------------- /assets/css/subtitles.css: -------------------------------------------------------------------------------- 1 | #snackbar { 2 | visibility: hidden; /* Hidden by default. Visible on click */ 3 | /* Set a default minimum width */ 4 | background-color: var(--block); /* Black background color */ 5 | color: #fff; /* White text color */ 6 | text-align: center; /* Centered text */ 7 | border-radius: 2px; /* Rounded borders */ 8 | padding: 16px; /* Padding */ 9 | position: fixed; /* Sit on top of the screen */ 10 | z-index: 1; /* Add a z-index if needed */ 11 | /* Center the snackbar */ 12 | bottom: 60px; /* 30px from the bottom */ 13 | border-radius: 5px; 14 | left: 50%; 15 | transform: translateX(-50%); 16 | opacity: 0.8; 17 | transition: 0.5s ease; 18 | } 19 | 20 | /* Show the snackbar when clicking on a button (class added with JavaScript) */ 21 | #snackbar.show { 22 | visibility: visible; /* Show the snackbar */ 23 | /* Add animation: Take 0.5 seconds to fade in and out the snackbar. 24 | However, delay the fade out process for 2.5 seconds */ 25 | -webkit-animation: fadein 0.5s; 26 | animation: fadein 0.5s; 27 | z-index: 99; 28 | } 29 | 30 | /* Animations to fade the snackbar in and out */ 31 | @-webkit-keyframes fadein { 32 | from {bottom: 0; opacity: 0;} 33 | to {bottom: 60px; opacity: 0.8;} 34 | } 35 | 36 | @keyframes fadein { 37 | from {bottom: 0; opacity: 0;} 38 | to {bottom: 60px; opacity: 0.8;} 39 | } 40 | 41 | 42 | .mast__text { 43 | font-size: 1em; 44 | margin: 0 0 0.5em; 45 | line-height: 1.5; 46 | white-space: pre; 47 | } 48 | .mast__text span { 49 | -webkit-animation: letter-glow 0.4s 0s ease both; 50 | animation: letter-glow 0.4s 0s ease both; 51 | } 52 | .mast__text span:nth-child(1) { 53 | -webkit-animation-delay: 0.05s; 54 | animation-delay: 0.05s; 55 | } 56 | .mast__text span:nth-child(2) { 57 | -webkit-animation-delay: 0.1s; 58 | animation-delay: 0.1s; 59 | } 60 | .mast__text span:nth-child(3) { 61 | -webkit-animation-delay: 0.15s; 62 | animation-delay: 0.15s; 63 | } 64 | .mast__text span:nth-child(4) { 65 | -webkit-animation-delay: 0.2s; 66 | animation-delay: 0.2s; 67 | } 68 | .mast__text span:nth-child(5) { 69 | -webkit-animation-delay: 0.25s; 70 | animation-delay: 0.25s; 71 | } 72 | .mast__text span:nth-child(6) { 73 | -webkit-animation-delay: 0.3s; 74 | animation-delay: 0.3s; 75 | } 76 | .mast__text span:nth-child(7) { 77 | -webkit-animation-delay: 0.35s; 78 | animation-delay: 0.35s; 79 | } 80 | .mast__text span:nth-child(8) { 81 | -webkit-animation-delay: 0.4s; 82 | animation-delay: 0.4s; 83 | } 84 | .mast__text span:nth-child(9) { 85 | -webkit-animation-delay: 0.45s; 86 | animation-delay: 0.45s; 87 | } 88 | .mast__text span:nth-child(10) { 89 | -webkit-animation-delay: 0.5s; 90 | animation-delay: 0.5s; 91 | } 92 | .mast__text span:nth-child(11) { 93 | -webkit-animation-delay: 0.55s; 94 | animation-delay: 0.55s; 95 | } 96 | .mast__text span:nth-child(12) { 97 | -webkit-animation-delay: 0.6s; 98 | animation-delay: 0.6s; 99 | } 100 | .mast__text span:nth-child(13) { 101 | -webkit-animation-delay: 0.65s; 102 | animation-delay: 0.65s; 103 | } 104 | .mast__text span:nth-child(14) { 105 | -webkit-animation-delay: 0.7s; 106 | animation-delay: 0.7s; 107 | } 108 | .mast__text span:nth-child(15) { 109 | -webkit-animation-delay: 0.75s; 110 | animation-delay: 0.75s; 111 | } 112 | .mast__text span:nth-child(16) { 113 | -webkit-animation-delay: 0.8s; 114 | animation-delay: 0.8s; 115 | } 116 | .mast__text span:nth-child(17) { 117 | -webkit-animation-delay: 0.85s; 118 | animation-delay: 0.85s; 119 | } 120 | .mast__text span:nth-child(18) { 121 | -webkit-animation-delay: 0.9s; 122 | animation-delay: 0.9s; 123 | } 124 | .mast__text span:nth-child(19) { 125 | -webkit-animation-delay: 0.95s; 126 | animation-delay: 0.95s; 127 | } 128 | .mast__text span:nth-child(20) { 129 | -webkit-animation-delay: 1s; 130 | animation-delay: 1s; 131 | } 132 | .mast__text span:nth-child(21) { 133 | -webkit-animation-delay: 1.05s; 134 | animation-delay: 1.05s; 135 | } 136 | .mast__text span:nth-child(22) { 137 | -webkit-animation-delay: 1.1s; 138 | animation-delay: 1.1s; 139 | } 140 | .mast__text span:nth-child(23) { 141 | -webkit-animation-delay: 1.15s; 142 | animation-delay: 1.15s; 143 | } 144 | .mast__text span:nth-child(24) { 145 | -webkit-animation-delay: 1.2s; 146 | animation-delay: 1.2s; 147 | } 148 | .mast__text span:nth-child(25) { 149 | -webkit-animation-delay: 1.25s; 150 | animation-delay: 1.25s; 151 | } 152 | .mast__text span:nth-child(26) { 153 | -webkit-animation-delay: 1.3s; 154 | animation-delay: 1.3s; 155 | } 156 | .mast__text span:nth-child(27) { 157 | -webkit-animation-delay: 1.35s; 158 | animation-delay: 1.35s; 159 | } 160 | .mast__text span:nth-child(28) { 161 | -webkit-animation-delay: 1.4s; 162 | animation-delay: 1.4s; 163 | } 164 | .mast__text span:nth-child(29) { 165 | -webkit-animation-delay: 1.45s; 166 | animation-delay: 1.45s; 167 | } 168 | .mast__text span:nth-child(30) { 169 | -webkit-animation-delay: 1.5s; 170 | animation-delay: 1.5s; 171 | } 172 | .mast__text span:nth-child(31) { 173 | -webkit-animation-delay: 1.55s; 174 | animation-delay: 1.55s; 175 | } 176 | .mast__text span:nth-child(32) { 177 | -webkit-animation-delay: 1.6s; 178 | animation-delay: 1.6s; 179 | } 180 | .mast__text span:nth-child(33) { 181 | -webkit-animation-delay: 1.65s; 182 | animation-delay: 1.65s; 183 | } 184 | .mast__text span:nth-child(34) { 185 | -webkit-animation-delay: 1.7s; 186 | animation-delay: 1.7s; 187 | } 188 | .mast__text span:nth-child(35) { 189 | -webkit-animation-delay: 1.75s; 190 | animation-delay: 1.75s; 191 | } 192 | .mast__text span:nth-child(36) { 193 | -webkit-animation-delay: 1.8s; 194 | animation-delay: 1.8s; 195 | } 196 | .mast__text span:nth-child(37) { 197 | -webkit-animation-delay: 1.85s; 198 | animation-delay: 1.85s; 199 | } 200 | .mast__text span:nth-child(38) { 201 | -webkit-animation-delay: 1.9s; 202 | animation-delay: 1.9s; 203 | } 204 | .mast__text span:nth-child(39) { 205 | -webkit-animation-delay: 1.95s; 206 | animation-delay: 1.95s; 207 | } 208 | .mast__text span:nth-child(40) { 209 | -webkit-animation-delay: 2s; 210 | animation-delay: 2s; 211 | } 212 | .mast__text span:nth-child(41) { 213 | -webkit-animation-delay: 2.05s; 214 | animation-delay: 2.05s; 215 | } 216 | .mast__text span:nth-child(42) { 217 | -webkit-animation-delay: 2.1s; 218 | animation-delay: 2.1s; 219 | } 220 | .mast__text span:nth-child(43) { 221 | -webkit-animation-delay: 2.15s; 222 | animation-delay: 2.15s; 223 | } 224 | .mast__text span:nth-child(44) { 225 | -webkit-animation-delay: 2.2s; 226 | animation-delay: 2.2s; 227 | } 228 | .mast__text span:nth-child(45) { 229 | -webkit-animation-delay: 2.25s; 230 | animation-delay: 2.25s; 231 | } 232 | .mast__text span:nth-child(46) { 233 | -webkit-animation-delay: 2.3s; 234 | animation-delay: 2.3s; 235 | } 236 | .mast__text span:nth-child(47) { 237 | -webkit-animation-delay: 2.35s; 238 | animation-delay: 2.35s; 239 | } 240 | .mast__text span:nth-child(48) { 241 | -webkit-animation-delay: 2.4s; 242 | animation-delay: 2.4s; 243 | } 244 | .mast__text span:nth-child(49) { 245 | -webkit-animation-delay: 2.45s; 246 | animation-delay: 2.45s; 247 | } 248 | .mast__text span:nth-child(50) { 249 | -webkit-animation-delay: 2.5s; 250 | animation-delay: 2.5s; 251 | } 252 | .mast__text span:nth-child(51) { 253 | -webkit-animation-delay: 2.55s; 254 | animation-delay: 2.55s; 255 | } 256 | .mast__text span:nth-child(52) { 257 | -webkit-animation-delay: 2.6s; 258 | animation-delay: 2.6s; 259 | } 260 | .mast__text span:nth-child(53) { 261 | -webkit-animation-delay: 2.65s; 262 | animation-delay: 2.65s; 263 | } 264 | .mast__text span:nth-child(54) { 265 | -webkit-animation-delay: 2.7s; 266 | animation-delay: 2.7s; 267 | } 268 | .mast__text span:nth-child(55) { 269 | -webkit-animation-delay: 2.75s; 270 | animation-delay: 2.75s; 271 | } 272 | .mast__text span:nth-child(56) { 273 | -webkit-animation-delay: 2.8s; 274 | animation-delay: 2.8s; 275 | } 276 | .mast__text span:nth-child(57) { 277 | -webkit-animation-delay: 2.85s; 278 | animation-delay: 2.85s; 279 | } 280 | .mast__text span:nth-child(58) { 281 | -webkit-animation-delay: 2.9s; 282 | animation-delay: 2.9s; 283 | } 284 | .mast__text span:nth-child(59) { 285 | -webkit-animation-delay: 2.95s; 286 | animation-delay: 2.95s; 287 | } 288 | .mast__text span:nth-child(60) { 289 | -webkit-animation-delay: 3s; 290 | animation-delay: 3s; 291 | } 292 | .mast__text span:nth-child(61) { 293 | -webkit-animation-delay: 3.05s; 294 | animation-delay: 3.05s; 295 | } 296 | .mast__text span:nth-child(62) { 297 | -webkit-animation-delay: 3.1s; 298 | animation-delay: 3.1s; 299 | } 300 | .mast__text span:nth-child(63) { 301 | -webkit-animation-delay: 3.15s; 302 | animation-delay: 3.15s; 303 | } 304 | .mast__text span:nth-child(64) { 305 | -webkit-animation-delay: 3.2s; 306 | animation-delay: 3.2s; 307 | } 308 | .mast__text span:nth-child(65) { 309 | -webkit-animation-delay: 3.25s; 310 | animation-delay: 3.25s; 311 | } 312 | .mast__text span:nth-child(66) { 313 | -webkit-animation-delay: 3.3s; 314 | animation-delay: 3.3s; 315 | } 316 | .mast__text span:nth-child(67) { 317 | -webkit-animation-delay: 3.35s; 318 | animation-delay: 3.35s; 319 | } 320 | .mast__text span:nth-child(68) { 321 | -webkit-animation-delay: 3.4s; 322 | animation-delay: 3.4s; 323 | } 324 | .mast__text span:nth-child(69) { 325 | -webkit-animation-delay: 3.45s; 326 | animation-delay: 3.45s; 327 | } 328 | .mast__text span:nth-child(70) { 329 | -webkit-animation-delay: 3.5s; 330 | animation-delay: 3.5s; 331 | } 332 | .mast__text span:nth-child(71) { 333 | -webkit-animation-delay: 3.55s; 334 | animation-delay: 3.55s; 335 | } 336 | .mast__text span:nth-child(72) { 337 | -webkit-animation-delay: 3.6s; 338 | animation-delay: 3.6s; 339 | } 340 | .mast__text span:nth-child(73) { 341 | -webkit-animation-delay: 3.65s; 342 | animation-delay: 3.65s; 343 | } 344 | .mast__text span:nth-child(74) { 345 | -webkit-animation-delay: 3.7s; 346 | animation-delay: 3.7s; 347 | } 348 | .mast__text span:nth-child(75) { 349 | -webkit-animation-delay: 3.75s; 350 | animation-delay: 3.75s; 351 | } 352 | .mast__text span:nth-child(76) { 353 | -webkit-animation-delay: 3.8s; 354 | animation-delay: 3.8s; 355 | } 356 | .mast__text span:nth-child(77) { 357 | -webkit-animation-delay: 3.85s; 358 | animation-delay: 3.85s; 359 | } 360 | .mast__text span:nth-child(78) { 361 | -webkit-animation-delay: 3.9s; 362 | animation-delay: 3.9s; 363 | } 364 | .mast__text span:nth-child(79) { 365 | -webkit-animation-delay: 3.95s; 366 | animation-delay: 3.95s; 367 | } 368 | .mast__text span:nth-child(80) { 369 | -webkit-animation-delay: 4s; 370 | animation-delay: 4s; 371 | } 372 | .mast__text span:nth-child(81) { 373 | -webkit-animation-delay: 4.05s; 374 | animation-delay: 4.05s; 375 | } 376 | .mast__text span:nth-child(82) { 377 | -webkit-animation-delay: 4.1s; 378 | animation-delay: 4.1s; 379 | } 380 | .mast__text span:nth-child(83) { 381 | -webkit-animation-delay: 4.15s; 382 | animation-delay: 4.15s; 383 | } 384 | .mast__text span:nth-child(84) { 385 | -webkit-animation-delay: 4.2s; 386 | animation-delay: 4.2s; 387 | } 388 | .mast__text span:nth-child(85) { 389 | -webkit-animation-delay: 4.25s; 390 | animation-delay: 4.25s; 391 | } 392 | .mast__text span:nth-child(86) { 393 | -webkit-animation-delay: 4.3s; 394 | animation-delay: 4.3s; 395 | } 396 | .mast__text span:nth-child(87) { 397 | -webkit-animation-delay: 4.35s; 398 | animation-delay: 4.35s; 399 | } 400 | .mast__text span:nth-child(88) { 401 | -webkit-animation-delay: 4.4s; 402 | animation-delay: 4.4s; 403 | } 404 | .mast__text span:nth-child(89) { 405 | -webkit-animation-delay: 4.45s; 406 | animation-delay: 4.45s; 407 | } 408 | .mast__text span:nth-child(90) { 409 | -webkit-animation-delay: 4.5s; 410 | animation-delay: 4.5s; 411 | } 412 | .mast__text span:nth-child(91) { 413 | -webkit-animation-delay: 4.55s; 414 | animation-delay: 4.55s; 415 | } 416 | .mast__text span:nth-child(92) { 417 | -webkit-animation-delay: 4.6s; 418 | animation-delay: 4.6s; 419 | } 420 | .mast__text span:nth-child(93) { 421 | -webkit-animation-delay: 4.65s; 422 | animation-delay: 4.65s; 423 | } 424 | .mast__text span:nth-child(94) { 425 | -webkit-animation-delay: 4.7s; 426 | animation-delay: 4.7s; 427 | } 428 | .mast__text span:nth-child(95) { 429 | -webkit-animation-delay: 4.75s; 430 | animation-delay: 4.75s; 431 | } 432 | .mast__text span:nth-child(96) { 433 | -webkit-animation-delay: 4.8s; 434 | animation-delay: 4.8s; 435 | } 436 | .mast__text span:nth-child(97) { 437 | -webkit-animation-delay: 4.85s; 438 | animation-delay: 4.85s; 439 | } 440 | .mast__text span:nth-child(98) { 441 | -webkit-animation-delay: 4.9s; 442 | animation-delay: 4.9s; 443 | } 444 | .mast__text span:nth-child(99) { 445 | -webkit-animation-delay: 4.95s; 446 | animation-delay: 4.95s; 447 | } 448 | .mast__text span:nth-child(100) { 449 | -webkit-animation-delay: 5s; 450 | animation-delay: 5s; 451 | } 452 | .mast__text span:nth-child(101) { 453 | -webkit-animation-delay: 5.05s; 454 | animation-delay: 5.05s; 455 | } 456 | .mast__text span:nth-child(102) { 457 | -webkit-animation-delay: 5.1s; 458 | animation-delay: 5.1s; 459 | } 460 | .mast__text span:nth-child(103) { 461 | -webkit-animation-delay: 5.15s; 462 | animation-delay: 5.15s; 463 | } 464 | .mast__text span:nth-child(104) { 465 | -webkit-animation-delay: 5.2s; 466 | animation-delay: 5.2s; 467 | } 468 | .mast__text span:nth-child(105) { 469 | -webkit-animation-delay: 5.25s; 470 | animation-delay: 5.25s; 471 | } 472 | .mast__text span:nth-child(106) { 473 | -webkit-animation-delay: 5.3s; 474 | animation-delay: 5.3s; 475 | } 476 | .mast__text span:nth-child(107) { 477 | -webkit-animation-delay: 5.35s; 478 | animation-delay: 5.35s; 479 | } 480 | .mast__text span:nth-child(108) { 481 | -webkit-animation-delay: 5.4s; 482 | animation-delay: 5.4s; 483 | } 484 | .mast__text span:nth-child(109) { 485 | -webkit-animation-delay: 5.45s; 486 | animation-delay: 5.45s; 487 | } 488 | .mast__text span:nth-child(110) { 489 | -webkit-animation-delay: 5.5s; 490 | animation-delay: 5.5s; 491 | } 492 | .mast__text span:nth-child(111) { 493 | -webkit-animation-delay: 5.55s; 494 | animation-delay: 5.55s; 495 | } 496 | .mast__text span:nth-child(112) { 497 | -webkit-animation-delay: 5.6s; 498 | animation-delay: 5.6s; 499 | } 500 | .mast__text span:nth-child(113) { 501 | -webkit-animation-delay: 5.65s; 502 | animation-delay: 5.65s; 503 | } 504 | .mast__text span:nth-child(114) { 505 | -webkit-animation-delay: 5.7s; 506 | animation-delay: 5.7s; 507 | } 508 | .mast__text span:nth-child(115) { 509 | -webkit-animation-delay: 5.75s; 510 | animation-delay: 5.75s; 511 | } 512 | .mast__text span:nth-child(116) { 513 | -webkit-animation-delay: 5.8s; 514 | animation-delay: 5.8s; 515 | } 516 | .mast__text span:nth-child(117) { 517 | -webkit-animation-delay: 5.85s; 518 | animation-delay: 5.85s; 519 | } 520 | .mast__text span:nth-child(118) { 521 | -webkit-animation-delay: 5.9s; 522 | animation-delay: 5.9s; 523 | } 524 | .mast__text span:nth-child(119) { 525 | -webkit-animation-delay: 5.95s; 526 | animation-delay: 5.95s; 527 | } 528 | .mast__text span:nth-child(120) { 529 | -webkit-animation-delay: 6s; 530 | animation-delay: 6s; 531 | } 532 | .mast__text span:nth-child(121) { 533 | -webkit-animation-delay: 6.05s; 534 | animation-delay: 6.05s; 535 | } 536 | .mast__text span:nth-child(122) { 537 | -webkit-animation-delay: 6.1s; 538 | animation-delay: 6.1s; 539 | } 540 | .mast__text span:nth-child(123) { 541 | -webkit-animation-delay: 6.15s; 542 | animation-delay: 6.15s; 543 | } 544 | .mast__text span:nth-child(124) { 545 | -webkit-animation-delay: 6.2s; 546 | animation-delay: 6.2s; 547 | } 548 | .mast__text span:nth-child(125) { 549 | -webkit-animation-delay: 6.25s; 550 | animation-delay: 6.25s; 551 | } 552 | .mast__text span:nth-child(126) { 553 | -webkit-animation-delay: 6.3s; 554 | animation-delay: 6.3s; 555 | } 556 | .mast__text span:nth-child(127) { 557 | -webkit-animation-delay: 6.35s; 558 | animation-delay: 6.35s; 559 | } 560 | .mast__text span:nth-child(128) { 561 | -webkit-animation-delay: 6.4s; 562 | animation-delay: 6.4s; 563 | } 564 | .mast__text span:nth-child(129) { 565 | -webkit-animation-delay: 6.45s; 566 | animation-delay: 6.45s; 567 | } 568 | .mast__text span:nth-child(130) { 569 | -webkit-animation-delay: 6.5s; 570 | animation-delay: 6.5s; 571 | } 572 | .mast__text span:nth-child(131) { 573 | -webkit-animation-delay: 6.55s; 574 | animation-delay: 6.55s; 575 | } 576 | .mast__text span:nth-child(132) { 577 | -webkit-animation-delay: 6.6s; 578 | animation-delay: 6.6s; 579 | } 580 | .mast__text span:nth-child(133) { 581 | -webkit-animation-delay: 6.65s; 582 | animation-delay: 6.65s; 583 | } 584 | .mast__text span:nth-child(134) { 585 | -webkit-animation-delay: 6.7s; 586 | animation-delay: 6.7s; 587 | } 588 | .mast__text span:nth-child(135) { 589 | -webkit-animation-delay: 6.75s; 590 | animation-delay: 6.75s; 591 | } 592 | .mast__text span:nth-child(136) { 593 | -webkit-animation-delay: 6.8s; 594 | animation-delay: 6.8s; 595 | } 596 | .mast__text span:nth-child(137) { 597 | -webkit-animation-delay: 6.85s; 598 | animation-delay: 6.85s; 599 | } 600 | .mast__text span:nth-child(138) { 601 | -webkit-animation-delay: 6.9s; 602 | animation-delay: 6.9s; 603 | } 604 | .mast__text span:nth-child(139) { 605 | -webkit-animation-delay: 6.95s; 606 | animation-delay: 6.95s; 607 | } 608 | .mast__text span:nth-child(140) { 609 | -webkit-animation-delay: 7s; 610 | animation-delay: 7s; 611 | } 612 | .mast__text span:nth-child(141) { 613 | -webkit-animation-delay: 7.05s; 614 | animation-delay: 7.05s; 615 | } 616 | .mast__text span:nth-child(142) { 617 | -webkit-animation-delay: 7.1s; 618 | animation-delay: 7.1s; 619 | } 620 | .mast__text span:nth-child(143) { 621 | -webkit-animation-delay: 7.15s; 622 | animation-delay: 7.15s; 623 | } 624 | .mast__text span:nth-child(144) { 625 | -webkit-animation-delay: 7.2s; 626 | animation-delay: 7.2s; 627 | } 628 | .mast__text span:nth-child(145) { 629 | -webkit-animation-delay: 7.25s; 630 | animation-delay: 7.25s; 631 | } 632 | .mast__text span:nth-child(146) { 633 | -webkit-animation-delay: 7.3s; 634 | animation-delay: 7.3s; 635 | } 636 | .mast__text span:nth-child(147) { 637 | -webkit-animation-delay: 7.35s; 638 | animation-delay: 7.35s; 639 | } 640 | .mast__text span:nth-child(148) { 641 | -webkit-animation-delay: 7.4s; 642 | animation-delay: 7.4s; 643 | } 644 | .mast__text span:nth-child(149) { 645 | -webkit-animation-delay: 7.45s; 646 | animation-delay: 7.45s; 647 | } 648 | .mast__text span:nth-child(150) { 649 | -webkit-animation-delay: 7.5s; 650 | animation-delay: 7.5s; 651 | } 652 | .mast__text span:nth-child(151) { 653 | -webkit-animation-delay: 7.55s; 654 | animation-delay: 7.55s; 655 | } 656 | .mast__text span:nth-child(152) { 657 | -webkit-animation-delay: 7.6s; 658 | animation-delay: 7.6s; 659 | } 660 | .mast__text span:nth-child(153) { 661 | -webkit-animation-delay: 7.65s; 662 | animation-delay: 7.65s; 663 | } 664 | .mast__text span:nth-child(154) { 665 | -webkit-animation-delay: 7.7s; 666 | animation-delay: 7.7s; 667 | } 668 | .mast__text span:nth-child(155) { 669 | -webkit-animation-delay: 7.75s; 670 | animation-delay: 7.75s; 671 | } 672 | .mast__text span:nth-child(156) { 673 | -webkit-animation-delay: 7.8s; 674 | animation-delay: 7.8s; 675 | } 676 | .mast__text span:nth-child(157) { 677 | -webkit-animation-delay: 7.85s; 678 | animation-delay: 7.85s; 679 | } 680 | .mast__text span:nth-child(158) { 681 | -webkit-animation-delay: 7.9s; 682 | animation-delay: 7.9s; 683 | } 684 | .mast__text span:nth-child(159) { 685 | -webkit-animation-delay: 7.95s; 686 | animation-delay: 7.95s; 687 | } 688 | .mast__text span:nth-child(160) { 689 | -webkit-animation-delay: 8s; 690 | animation-delay: 8s; 691 | } 692 | .mast__text span:nth-child(161) { 693 | -webkit-animation-delay: 8.05s; 694 | animation-delay: 8.05s; 695 | } 696 | .mast__text span:nth-child(162) { 697 | -webkit-animation-delay: 8.1s; 698 | animation-delay: 8.1s; 699 | } 700 | .mast__text span:nth-child(163) { 701 | -webkit-animation-delay: 8.15s; 702 | animation-delay: 8.15s; 703 | } 704 | .mast__text span:nth-child(164) { 705 | -webkit-animation-delay: 8.2s; 706 | animation-delay: 8.2s; 707 | } 708 | .mast__text span:nth-child(165) { 709 | -webkit-animation-delay: 8.25s; 710 | animation-delay: 8.25s; 711 | } 712 | .mast__text span:nth-child(166) { 713 | -webkit-animation-delay: 8.3s; 714 | animation-delay: 8.3s; 715 | } 716 | .mast__text span:nth-child(167) { 717 | -webkit-animation-delay: 8.35s; 718 | animation-delay: 8.35s; 719 | } 720 | .mast__text span:nth-child(168) { 721 | -webkit-animation-delay: 8.4s; 722 | animation-delay: 8.4s; 723 | } 724 | .mast__text span:nth-child(169) { 725 | -webkit-animation-delay: 8.45s; 726 | animation-delay: 8.45s; 727 | } 728 | .mast__text span:nth-child(170) { 729 | -webkit-animation-delay: 8.5s; 730 | animation-delay: 8.5s; 731 | } 732 | .mast__text span:nth-child(171) { 733 | -webkit-animation-delay: 8.55s; 734 | animation-delay: 8.55s; 735 | } 736 | .mast__text span:nth-child(172) { 737 | -webkit-animation-delay: 8.6s; 738 | animation-delay: 8.6s; 739 | } 740 | .mast__text span:nth-child(173) { 741 | -webkit-animation-delay: 8.65s; 742 | animation-delay: 8.65s; 743 | } 744 | .mast__text span:nth-child(174) { 745 | -webkit-animation-delay: 8.7s; 746 | animation-delay: 8.7s; 747 | } 748 | .mast__text span:nth-child(175) { 749 | -webkit-animation-delay: 8.75s; 750 | animation-delay: 8.75s; 751 | } 752 | .mast__text span:nth-child(176) { 753 | -webkit-animation-delay: 8.8s; 754 | animation-delay: 8.8s; 755 | } 756 | .mast__text span:nth-child(177) { 757 | -webkit-animation-delay: 8.85s; 758 | animation-delay: 8.85s; 759 | } 760 | .mast__text span:nth-child(178) { 761 | -webkit-animation-delay: 8.9s; 762 | animation-delay: 8.9s; 763 | } 764 | .mast__text span:nth-child(179) { 765 | -webkit-animation-delay: 8.95s; 766 | animation-delay: 8.95s; 767 | } 768 | .mast__text span:nth-child(180) { 769 | -webkit-animation-delay: 9s; 770 | animation-delay: 9s; 771 | } 772 | 773 | @-webkit-keyframes letter-glow { 774 | 0% { 775 | opacity: 0; 776 | transform: scale(0.5); 777 | text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.1); 778 | } 779 | 66% { 780 | opacity: 1; 781 | transform: scale(1); 782 | text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.9); 783 | } 784 | 77% { 785 | opacity: 1; 786 | } 787 | 100% { 788 | text-shadow: 0px 0px 20px rgba(255, 255, 255, 0); 789 | } 790 | } 791 | 792 | @keyframes letter-glow { 793 | 0% { 794 | opacity: 0; 795 | transform: scale(0.5); 796 | text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.1); 797 | } 798 | 66% { 799 | transform: scale(1); 800 | opacity: 1; 801 | text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.9); 802 | } 803 | 77% { 804 | opacity: 1; 805 | } 806 | 100% { 807 | text-shadow: 0px 0px 20px rgba(255, 255, 255, 0); 808 | } 809 | } -------------------------------------------------------------------------------- /assets/icons/fontawsome/css/v4-shims.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.10.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | .fa.fa-glass:before{content:"\f000"}.fa.fa-meetup{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-star-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-o:before{content:"\f005"}.fa.fa-close:before,.fa.fa-remove:before{content:"\f00d"}.fa.fa-gear:before{content:"\f013"}.fa.fa-trash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-trash-o:before{content:"\f2ed"}.fa.fa-file-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-o:before{content:"\f15b"}.fa.fa-clock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-clock-o:before{content:"\f017"}.fa.fa-arrow-circle-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-down:before{content:"\f358"}.fa.fa-arrow-circle-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-up:before{content:"\f35b"}.fa.fa-play-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-play-circle-o:before{content:"\f144"}.fa.fa-repeat:before,.fa.fa-rotate-right:before{content:"\f01e"}.fa.fa-refresh:before{content:"\f021"}.fa.fa-list-alt{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dedent:before{content:"\f03b"}.fa.fa-video-camera:before{content:"\f03d"}.fa.fa-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-picture-o:before{content:"\f03e"}.fa.fa-photo{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-photo:before{content:"\f03e"}.fa.fa-image{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-image:before{content:"\f03e"}.fa.fa-pencil:before{content:"\f303"}.fa.fa-map-marker:before{content:"\f3c5"}.fa.fa-pencil-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pencil-square-o:before{content:"\f044"}.fa.fa-share-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-share-square-o:before{content:"\f14d"}.fa.fa-check-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-square-o:before{content:"\f14a"}.fa.fa-arrows:before{content:"\f0b2"}.fa.fa-times-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-circle-o:before{content:"\f057"}.fa.fa-check-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-circle-o:before{content:"\f058"}.fa.fa-mail-forward:before{content:"\f064"}.fa.fa-eye,.fa.fa-eye-slash{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-warning:before{content:"\f071"}.fa.fa-calendar:before{content:"\f073"}.fa.fa-arrows-v:before{content:"\f338"}.fa.fa-arrows-h:before{content:"\f337"}.fa.fa-bar-chart{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart:before{content:"\f080"}.fa.fa-bar-chart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart-o:before{content:"\f080"}.fa.fa-facebook-square,.fa.fa-twitter-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gears:before{content:"\f085"}.fa.fa-thumbs-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-up:before{content:"\f164"}.fa.fa-thumbs-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-down:before{content:"\f165"}.fa.fa-heart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-heart-o:before{content:"\f004"}.fa.fa-sign-out:before{content:"\f2f5"}.fa.fa-linkedin-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin-square:before{content:"\f08c"}.fa.fa-thumb-tack:before{content:"\f08d"}.fa.fa-external-link:before{content:"\f35d"}.fa.fa-sign-in:before{content:"\f2f6"}.fa.fa-github-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-lemon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lemon-o:before{content:"\f094"}.fa.fa-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-square-o:before{content:"\f0c8"}.fa.fa-bookmark-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bookmark-o:before{content:"\f02e"}.fa.fa-facebook,.fa.fa-twitter{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook:before{content:"\f39e"}.fa.fa-facebook-f{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-f:before{content:"\f39e"}.fa.fa-github{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-feed:before{content:"\f09e"}.fa.fa-hdd-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hdd-o:before{content:"\f0a0"}.fa.fa-hand-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-right:before{content:"\f0a4"}.fa.fa-hand-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-left:before{content:"\f0a5"}.fa.fa-hand-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-up:before{content:"\f0a6"}.fa.fa-hand-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-down:before{content:"\f0a7"}.fa.fa-arrows-alt:before{content:"\f31e"}.fa.fa-group:before{content:"\f0c0"}.fa.fa-chain:before{content:"\f0c1"}.fa.fa-scissors:before{content:"\f0c4"}.fa.fa-files-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-files-o:before{content:"\f0c5"}.fa.fa-floppy-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-floppy-o:before{content:"\f0c7"}.fa.fa-navicon:before,.fa.fa-reorder:before{content:"\f0c9"}.fa.fa-google-plus,.fa.fa-google-plus-square,.fa.fa-pinterest,.fa.fa-pinterest-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus:before{content:"\f0d5"}.fa.fa-money{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-money:before{content:"\f3d1"}.fa.fa-unsorted:before{content:"\f0dc"}.fa.fa-sort-desc:before{content:"\f0dd"}.fa.fa-sort-asc:before{content:"\f0de"}.fa.fa-linkedin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin:before{content:"\f0e1"}.fa.fa-rotate-left:before{content:"\f0e2"}.fa.fa-legal:before{content:"\f0e3"}.fa.fa-dashboard:before,.fa.fa-tachometer:before{content:"\f3fd"}.fa.fa-comment-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comment-o:before{content:"\f075"}.fa.fa-comments-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comments-o:before{content:"\f086"}.fa.fa-flash:before{content:"\f0e7"}.fa.fa-clipboard,.fa.fa-paste{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paste:before{content:"\f328"}.fa.fa-lightbulb-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lightbulb-o:before{content:"\f0eb"}.fa.fa-exchange:before{content:"\f362"}.fa.fa-cloud-download:before{content:"\f381"}.fa.fa-cloud-upload:before{content:"\f382"}.fa.fa-bell-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-o:before{content:"\f0f3"}.fa.fa-cutlery:before{content:"\f2e7"}.fa.fa-file-text-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-text-o:before{content:"\f15c"}.fa.fa-building-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-building-o:before{content:"\f1ad"}.fa.fa-hospital-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hospital-o:before{content:"\f0f8"}.fa.fa-tablet:before{content:"\f3fa"}.fa.fa-mobile-phone:before,.fa.fa-mobile:before{content:"\f3cd"}.fa.fa-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-o:before{content:"\f111"}.fa.fa-mail-reply:before{content:"\f3e5"}.fa.fa-github-alt{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-folder-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-o:before{content:"\f07b"}.fa.fa-folder-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-open-o:before{content:"\f07c"}.fa.fa-smile-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-smile-o:before{content:"\f118"}.fa.fa-frown-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-frown-o:before{content:"\f119"}.fa.fa-meh-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-meh-o:before{content:"\f11a"}.fa.fa-keyboard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-keyboard-o:before{content:"\f11c"}.fa.fa-flag-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-flag-o:before{content:"\f024"}.fa.fa-mail-reply-all:before{content:"\f122"}.fa.fa-star-half-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-o:before{content:"\f089"}.fa.fa-star-half-empty{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-empty:before{content:"\f089"}.fa.fa-star-half-full{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-full:before{content:"\f089"}.fa.fa-code-fork:before{content:"\f126"}.fa.fa-chain-broken:before{content:"\f127"}.fa.fa-shield:before{content:"\f3ed"}.fa.fa-calendar-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-o:before{content:"\f133"}.fa.fa-css3,.fa.fa-html5,.fa.fa-maxcdn{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ticket:before{content:"\f3ff"}.fa.fa-minus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-minus-square-o:before{content:"\f146"}.fa.fa-level-up:before{content:"\f3bf"}.fa.fa-level-down:before{content:"\f3be"}.fa.fa-pencil-square:before{content:"\f14b"}.fa.fa-external-link-square:before{content:"\f360"}.fa.fa-compass{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down:before{content:"\f150"}.fa.fa-toggle-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-down:before{content:"\f150"}.fa.fa-caret-square-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-up:before{content:"\f151"}.fa.fa-toggle-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-up:before{content:"\f151"}.fa.fa-caret-square-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-right:before{content:"\f152"}.fa.fa-toggle-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-right:before{content:"\f152"}.fa.fa-eur:before,.fa.fa-euro:before{content:"\f153"}.fa.fa-gbp:before{content:"\f154"}.fa.fa-dollar:before,.fa.fa-usd:before{content:"\f155"}.fa.fa-inr:before,.fa.fa-rupee:before{content:"\f156"}.fa.fa-cny:before,.fa.fa-jpy:before,.fa.fa-rmb:before,.fa.fa-yen:before{content:"\f157"}.fa.fa-rouble:before,.fa.fa-rub:before,.fa.fa-ruble:before{content:"\f158"}.fa.fa-krw:before,.fa.fa-won:before{content:"\f159"}.fa.fa-bitcoin,.fa.fa-btc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitcoin:before{content:"\f15a"}.fa.fa-file-text:before{content:"\f15c"}.fa.fa-sort-alpha-asc:before{content:"\f15d"}.fa.fa-sort-alpha-desc:before{content:"\f881"}.fa.fa-sort-amount-asc:before{content:"\f160"}.fa.fa-sort-amount-desc:before{content:"\f884"}.fa.fa-sort-numeric-asc:before{content:"\f162"}.fa.fa-sort-numeric-desc:before{content:"\f886"}.fa.fa-xing,.fa.fa-xing-square,.fa.fa-youtube,.fa.fa-youtube-play,.fa.fa-youtube-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-youtube-play:before{content:"\f167"}.fa.fa-adn,.fa.fa-bitbucket,.fa.fa-bitbucket-square,.fa.fa-dropbox,.fa.fa-flickr,.fa.fa-instagram,.fa.fa-stack-overflow{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitbucket-square:before{content:"\f171"}.fa.fa-tumblr,.fa.fa-tumblr-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-long-arrow-down:before{content:"\f309"}.fa.fa-long-arrow-up:before{content:"\f30c"}.fa.fa-long-arrow-left:before{content:"\f30a"}.fa.fa-long-arrow-right:before{content:"\f30b"}.fa.fa-android,.fa.fa-apple,.fa.fa-dribbble,.fa.fa-foursquare,.fa.fa-gittip,.fa.fa-gratipay,.fa.fa-linux,.fa.fa-skype,.fa.fa-trello,.fa.fa-windows{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gittip:before{content:"\f184"}.fa.fa-sun-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sun-o:before{content:"\f185"}.fa.fa-moon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-moon-o:before{content:"\f186"}.fa.fa-pagelines,.fa.fa-renren,.fa.fa-stack-exchange,.fa.fa-vk,.fa.fa-weibo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-arrow-circle-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-right:before{content:"\f35a"}.fa.fa-arrow-circle-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-left:before{content:"\f359"}.fa.fa-caret-square-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-left:before{content:"\f191"}.fa.fa-toggle-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-left:before{content:"\f191"}.fa.fa-dot-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dot-circle-o:before{content:"\f192"}.fa.fa-vimeo-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-try:before,.fa.fa-turkish-lira:before{content:"\f195"}.fa.fa-plus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-plus-square-o:before{content:"\f0fe"}.fa.fa-openid,.fa.fa-slack,.fa.fa-wordpress{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bank:before,.fa.fa-institution:before{content:"\f19c"}.fa.fa-mortar-board:before{content:"\f19d"}.fa.fa-delicious,.fa.fa-digg,.fa.fa-drupal,.fa.fa-google,.fa.fa-joomla,.fa.fa-pied-piper-alt,.fa.fa-pied-piper-pp,.fa.fa-reddit,.fa.fa-reddit-square,.fa.fa-stumbleupon,.fa.fa-stumbleupon-circle,.fa.fa-yahoo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-spoon:before{content:"\f2e5"}.fa.fa-behance,.fa.fa-behance-square,.fa.fa-steam,.fa.fa-steam-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-automobile:before{content:"\f1b9"}.fa.fa-cab:before{content:"\f1ba"}.fa.fa-envelope-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-o:before{content:"\f0e0"}.fa.fa-deviantart,.fa.fa-soundcloud{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-file-pdf-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-pdf-o:before{content:"\f1c1"}.fa.fa-file-word-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-word-o:before{content:"\f1c2"}.fa.fa-file-excel-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-excel-o:before{content:"\f1c3"}.fa.fa-file-powerpoint-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-powerpoint-o:before{content:"\f1c4"}.fa.fa-file-image-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-image-o:before{content:"\f1c5"}.fa.fa-file-photo-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-photo-o:before{content:"\f1c5"}.fa.fa-file-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-picture-o:before{content:"\f1c5"}.fa.fa-file-archive-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-archive-o:before{content:"\f1c6"}.fa.fa-file-zip-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-zip-o:before{content:"\f1c6"}.fa.fa-file-audio-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-audio-o:before{content:"\f1c7"}.fa.fa-file-sound-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-sound-o:before{content:"\f1c7"}.fa.fa-file-video-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-video-o:before{content:"\f1c8"}.fa.fa-file-movie-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-movie-o:before{content:"\f1c8"}.fa.fa-file-code-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-code-o:before{content:"\f1c9"}.fa.fa-codepen,.fa.fa-jsfiddle,.fa.fa-vine{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-life-bouy,.fa.fa-life-ring{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-bouy:before{content:"\f1cd"}.fa.fa-life-buoy{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-buoy:before{content:"\f1cd"}.fa.fa-life-saver{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-saver:before{content:"\f1cd"}.fa.fa-support{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-support:before{content:"\f1cd"}.fa.fa-circle-o-notch:before{content:"\f1ce"}.fa.fa-ra,.fa.fa-rebel{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ra:before{content:"\f1d0"}.fa.fa-resistance{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-resistance:before{content:"\f1d0"}.fa.fa-empire,.fa.fa-ge{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ge:before{content:"\f1d1"}.fa.fa-git,.fa.fa-git-square,.fa.fa-hacker-news,.fa.fa-y-combinator-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-y-combinator-square:before{content:"\f1d4"}.fa.fa-yc-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc-square:before{content:"\f1d4"}.fa.fa-qq,.fa.fa-tencent-weibo,.fa.fa-wechat,.fa.fa-weixin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wechat:before{content:"\f1d7"}.fa.fa-send:before{content:"\f1d8"}.fa.fa-paper-plane-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paper-plane-o:before{content:"\f1d8"}.fa.fa-send-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-send-o:before{content:"\f1d8"}.fa.fa-circle-thin{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-thin:before{content:"\f111"}.fa.fa-header:before{content:"\f1dc"}.fa.fa-sliders:before{content:"\f1de"}.fa.fa-futbol-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-futbol-o:before{content:"\f1e3"}.fa.fa-soccer-ball-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-soccer-ball-o:before{content:"\f1e3"}.fa.fa-slideshare,.fa.fa-twitch,.fa.fa-yelp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-newspaper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-newspaper-o:before{content:"\f1ea"}.fa.fa-cc-amex,.fa.fa-cc-discover,.fa.fa-cc-mastercard,.fa.fa-cc-paypal,.fa.fa-cc-stripe,.fa.fa-cc-visa,.fa.fa-google-wallet,.fa.fa-paypal{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bell-slash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-slash-o:before{content:"\f1f6"}.fa.fa-trash:before{content:"\f2ed"}.fa.fa-copyright{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-eyedropper:before{content:"\f1fb"}.fa.fa-area-chart:before{content:"\f1fe"}.fa.fa-pie-chart:before{content:"\f200"}.fa.fa-line-chart:before{content:"\f201"}.fa.fa-angellist,.fa.fa-ioxhost,.fa.fa-lastfm,.fa.fa-lastfm-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-cc{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-cc:before{content:"\f20a"}.fa.fa-ils:before,.fa.fa-shekel:before,.fa.fa-sheqel:before{content:"\f20b"}.fa.fa-meanpath{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-meanpath:before{content:"\f2b4"}.fa.fa-buysellads,.fa.fa-connectdevelop,.fa.fa-dashcube,.fa.fa-forumbee,.fa.fa-leanpub,.fa.fa-sellsy,.fa.fa-shirtsinbulk,.fa.fa-simplybuilt,.fa.fa-skyatlas{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-diamond{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-diamond:before{content:"\f3a5"}.fa.fa-intersex:before{content:"\f224"}.fa.fa-facebook-official{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-official:before{content:"\f09a"}.fa.fa-pinterest-p,.fa.fa-whatsapp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-hotel:before{content:"\f236"}.fa.fa-medium,.fa.fa-viacoin,.fa.fa-y-combinator,.fa.fa-yc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc:before{content:"\f23b"}.fa.fa-expeditedssl,.fa.fa-opencart,.fa.fa-optin-monster{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-battery-4:before,.fa.fa-battery:before{content:"\f240"}.fa.fa-battery-3:before{content:"\f241"}.fa.fa-battery-2:before{content:"\f242"}.fa.fa-battery-1:before{content:"\f243"}.fa.fa-battery-0:before{content:"\f244"}.fa.fa-object-group,.fa.fa-object-ungroup,.fa.fa-sticky-note-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sticky-note-o:before{content:"\f249"}.fa.fa-cc-diners-club,.fa.fa-cc-jcb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-clone,.fa.fa-hourglass-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hourglass-o:before{content:"\f254"}.fa.fa-hourglass-1:before{content:"\f251"}.fa.fa-hourglass-2:before{content:"\f252"}.fa.fa-hourglass-3:before{content:"\f253"}.fa.fa-hand-rock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-rock-o:before{content:"\f255"}.fa.fa-hand-grab-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-grab-o:before{content:"\f255"}.fa.fa-hand-paper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-paper-o:before{content:"\f256"}.fa.fa-hand-stop-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-stop-o:before{content:"\f256"}.fa.fa-hand-scissors-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-scissors-o:before{content:"\f257"}.fa.fa-hand-lizard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-lizard-o:before{content:"\f258"}.fa.fa-hand-spock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-spock-o:before{content:"\f259"}.fa.fa-hand-pointer-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-pointer-o:before{content:"\f25a"}.fa.fa-hand-peace-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-peace-o:before{content:"\f25b"}.fa.fa-registered{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-chrome,.fa.fa-creative-commons,.fa.fa-firefox,.fa.fa-get-pocket,.fa.fa-gg,.fa.fa-gg-circle,.fa.fa-internet-explorer,.fa.fa-odnoklassniki,.fa.fa-odnoklassniki-square,.fa.fa-opera,.fa.fa-safari,.fa.fa-tripadvisor,.fa.fa-wikipedia-w{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-television:before{content:"\f26c"}.fa.fa-500px,.fa.fa-amazon,.fa.fa-contao{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-calendar-plus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-plus-o:before{content:"\f271"}.fa.fa-calendar-minus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-minus-o:before{content:"\f272"}.fa.fa-calendar-times-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-times-o:before{content:"\f273"}.fa.fa-calendar-check-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-check-o:before{content:"\f274"}.fa.fa-map-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-map-o:before{content:"\f279"}.fa.fa-commenting:before{content:"\f4ad"}.fa.fa-commenting-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-commenting-o:before{content:"\f4ad"}.fa.fa-houzz,.fa.fa-vimeo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-vimeo:before{content:"\f27d"}.fa.fa-black-tie,.fa.fa-edge,.fa.fa-fonticons,.fa.fa-reddit-alien{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card-alt:before{content:"\f09d"}.fa.fa-codiepie,.fa.fa-fort-awesome,.fa.fa-mixcloud,.fa.fa-modx,.fa.fa-product-hunt,.fa.fa-scribd,.fa.fa-usb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-pause-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pause-circle-o:before{content:"\f28b"}.fa.fa-stop-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-stop-circle-o:before{content:"\f28d"}.fa.fa-bluetooth,.fa.fa-bluetooth-b,.fa.fa-envira,.fa.fa-gitlab,.fa.fa-wheelchair-alt,.fa.fa-wpbeginner,.fa.fa-wpforms{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wheelchair-alt:before{content:"\f368"}.fa.fa-question-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-question-circle-o:before{content:"\f059"}.fa.fa-volume-control-phone:before{content:"\f2a0"}.fa.fa-asl-interpreting:before{content:"\f2a3"}.fa.fa-deafness:before,.fa.fa-hard-of-hearing:before{content:"\f2a4"}.fa.fa-glide,.fa.fa-glide-g{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-signing:before{content:"\f2a7"}.fa.fa-first-order,.fa.fa-google-plus-official,.fa.fa-pied-piper,.fa.fa-snapchat,.fa.fa-snapchat-ghost,.fa.fa-snapchat-square,.fa.fa-themeisle,.fa.fa-viadeo,.fa.fa-viadeo-square,.fa.fa-yoast{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-official:before{content:"\f2b3"}.fa.fa-google-plus-circle{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-circle:before{content:"\f2b3"}.fa.fa-fa,.fa.fa-font-awesome{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-fa:before{content:"\f2b4"}.fa.fa-handshake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-handshake-o:before{content:"\f2b5"}.fa.fa-envelope-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-open-o:before{content:"\f2b6"}.fa.fa-linode{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-address-book-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-book-o:before{content:"\f2b9"}.fa.fa-vcard:before{content:"\f2bb"}.fa.fa-address-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-card-o:before{content:"\f2bb"}.fa.fa-vcard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-vcard-o:before{content:"\f2bb"}.fa.fa-user-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-circle-o:before{content:"\f2bd"}.fa.fa-user-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-o:before{content:"\f007"}.fa.fa-id-badge{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license:before{content:"\f2c2"}.fa.fa-id-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-id-card-o:before{content:"\f2c2"}.fa.fa-drivers-license-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license-o:before{content:"\f2c2"}.fa.fa-free-code-camp,.fa.fa-quora,.fa.fa-telegram{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-thermometer-4:before,.fa.fa-thermometer:before{content:"\f2c7"}.fa.fa-thermometer-3:before{content:"\f2c8"}.fa.fa-thermometer-2:before{content:"\f2c9"}.fa.fa-thermometer-1:before{content:"\f2ca"}.fa.fa-thermometer-0:before{content:"\f2cb"}.fa.fa-bathtub:before,.fa.fa-s15:before{content:"\f2cd"}.fa.fa-window-maximize,.fa.fa-window-restore{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle:before{content:"\f410"}.fa.fa-window-close-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-window-close-o:before{content:"\f410"}.fa.fa-times-rectangle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle-o:before{content:"\f410"}.fa.fa-bandcamp,.fa.fa-eercast,.fa.fa-etsy,.fa.fa-grav,.fa.fa-imdb,.fa.fa-ravelry{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-eercast:before{content:"\f2da"}.fa.fa-snowflake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-snowflake-o:before{content:"\f2dc"}.fa.fa-spotify,.fa.fa-superpowers,.fa.fa-wpexplorer{font-family:"Font Awesome 5 Brands";font-weight:400} -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | const { shell, remote, ipcRenderer: ipc } = require('electron'), 2 | root = remote.app.getPath('userData').split("\\").join("/"), 3 | db = require('better-sqlite3-helper'), 4 | fs = require("fs"), 5 | child = require('child_process').exec, 6 | os = require('os'); 7 | 8 | if (!fs.existsSync(`${root}/images`)) fs.mkdirSync(`${root}/images`); 9 | if (!fs.existsSync(`${root}/full`)) fs.mkdirSync(`${root}/full`); 10 | if (!fs.existsSync(`${root}/youtube`)) fs.mkdirSync(`${root}/youtube`); 11 | if (!fs.existsSync(`${root}/redio.txt`)) fs.writeFileSync(`${root}/radio.txt`, "https://www.youtube.com/watch?v=oJ5tiq4DBNY"); 12 | if (!fs.existsSync(`${root}/redio.txt`)) fs.writeFileSync(`${root}/ffmpeg.txt`, "C:/ffmpeg"); 13 | 14 | console.log(root); 15 | 16 | db({ path: `${root}/database.db`, memory: false, readonly: false, fileMustExist: false, migrate: false }); 17 | 18 | let loaded = 0, 19 | musicStatus = {}, 20 | mini = false, 21 | ffmpeg = "C:/ffmpeg", 22 | fullscreen = 0, 23 | isLoved = false, 24 | youtubeRadio = false, 25 | ytQuery = [], 26 | radioPlayer, 27 | subtitles = false, 28 | first = true, 29 | audio, 30 | ping = false; 31 | 32 | window.onload = function () { 33 | start(); 34 | refresh(); 35 | loadSettings(); 36 | // checkUpdate(true); 37 | document.querySelector('#radio-id').value = `https://www.youtube.com/watch?v=5qap5aO4i9A`; 38 | ffmpeg = fs.readFileSync(`${root}/ffmpeg.txt`).toString(); 39 | // if (db().query("SELECT * from status")[0].loved == false) { refresh(); } else { openloved(); } 40 | discordUpdate(); 41 | app.ver = JSON.parse(fs.readFileSync(`${__dirname}/package.json`).toString()).version; 42 | $('.collapsible').collapsible(); 43 | ipc.send('ready'); 44 | }; 45 | 46 | function start() { 47 | var AudioPlayer = (function () { 48 | app.status.title = 'Select song...'; 49 | var player = document.getElementById('ap'), 50 | playBtn, prevBtn, video = false, 51 | nextBtn, plBtn, repeatBtn, volumeBtn, subtitlesBtn, progressBar, preloadBar, curTime, durTime, trackTitle, index = 0, 52 | wave = false, 53 | playList, volumeBar, videoBtn, volumeLength, repeating = false, 54 | random = false, 55 | seeking = false, 56 | rightClick = false, 57 | apActive = false, 58 | plHtml = [], 59 | pl = document.querySelector("#pl"), 60 | settings = { volume: db().query("SELECT * from status")[0].volume ? db().query("SELECT * from status")[0].volume : 0.1, autoPlay: false, notification: true, playList: [] }; 61 | 62 | function init(options) { 63 | for (let i = 0; i < document.querySelectorAll(".music-el").length; i++) { 64 | if (document.querySelectorAll(".music-el")[i]) document.querySelectorAll(".music-el")[i].classList.remove('pl-current'); 65 | } 66 | settings = extend(settings, options); 67 | playList = settings.playList; 68 | renderPL(); 69 | youtubeRadio = false; 70 | if (!('classList' in document.documentElement)) return false; 71 | if (apActive || player === null) return; 72 | playBtn = player.querySelector('.ap-toggle-btn'); 73 | prevBtn = player.querySelector('.ap-prev-btn'); 74 | nextBtn = player.querySelector('.ap-next-btn'); 75 | subtitlesBtn = player.querySelector('.subtitles'); 76 | videoBtn = player.querySelector('.video'); 77 | volumeBtn = player.querySelector('.ap-volume-btn'); 78 | plBtn = document.querySelector('.ap-playlist-btn'); 79 | curTime = player.querySelector('.ap-time--current'); 80 | durTime = player.querySelector('.ap-time--duration'); 81 | trackTitle = player.querySelector('.ap-title'); 82 | progressBar = player.querySelector('.ap-bar'); 83 | preloadBar = player.querySelector('.ap-preload-bar'); 84 | volumeBar = player.querySelector('.ap-volume-bar'); 85 | playBtn.addEventListener('click', playToggle, false); 86 | volumeBtn.addEventListener('click', volumeToggle, false); 87 | videoBtn.addEventListener('click', videoToggle, false); 88 | subtitlesBtn.addEventListener('click', subtitlesToggle, false); 89 | document.querySelector(".randomToggle").addEventListener('click', randomToggle, false); 90 | progressBar.parentNode.parentNode.addEventListener('mousedown', handlerBar, false); 91 | progressBar.parentNode.parentNode.addEventListener('mousemove', seek, false); 92 | document.documentElement.addEventListener('mouseup', seekingFalse, false); 93 | volumeBar.parentNode.parentNode.addEventListener('mousedown', handlerVol, false); 94 | volumeBar.parentNode.parentNode.addEventListener('mousemove', setVolume); 95 | document.documentElement.addEventListener('mouseup', seekingFalse, false); 96 | prevBtn.addEventListener('click', prev, false); 97 | nextBtn.addEventListener('click', next, false); 98 | document.querySelector('.ap').addEventListener("mousewheel", volumeWheel, false); 99 | audio = new Audio(); 100 | audio.volume = settings.volume; 101 | if (isEmptyList()) { 102 | empty(); 103 | return; 104 | } else { 105 | if (playList[index].need) return; 106 | apActive = true; 107 | audio.src = playList[index].file; 108 | audio.preload = 'auto'; 109 | volumeBar.style.height = audio.volume * 100 + '%'; 110 | volumeLength = volumeBar.css('height'); 111 | audio.addEventListener('error', error, false); 112 | audio.addEventListener('timeupdate', update, false); 113 | audio.addEventListener('ended', doEnd, false); 114 | } 115 | } 116 | 117 | let volumeWheel = function (e) { 118 | e = window.event || e; 119 | let delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); 120 | 121 | if (delta == 1) volumeUp(); 122 | if (delta == -1) volumeDown(); 123 | 124 | e.preventDefault(); 125 | }; 126 | 127 | function renderPL() { 128 | var html = []; 129 | playList.reverse().forEach(function (item, i) { 130 | item.fav = ``; 131 | if (item.loved == true) item.fav = ``; 132 | item.type = '' + '' + '' + ''; 133 | if (item.file.indexOf("osu") > -1) item.type = ``; 134 | if (item.videoId != undefined) item.type = ``; 135 | if (item.need != undefined) { 136 | item.type = ``; 137 | item.fav = ""; 138 | } 139 | item.dataId = i; 140 | if (i < 100) { 141 | item.hide = true; 142 | html.push(item); 143 | } else { 144 | item.hide = false; 145 | html.push(item); 146 | } 147 | }); 148 | app.playlist = html; 149 | setTimeout(() => { 150 | for (let i = 0; i < document.querySelectorAll('.music-el').length; i++) { 151 | document.querySelector("#pl").addEventListener('click', listHandler, false); 152 | let need = document.querySelectorAll(".pl-title")[i].innerHTML; 153 | if (need == app.status.title) { 154 | document.querySelectorAll(".music-el")[i].classList.add('pl-current'); 155 | AP.setIndex(i); 156 | } 157 | } 158 | if (first && db().query("SELECT * from status")[0].dataId != 0) { 159 | first = false; 160 | index = db().query("SELECT * from status")[0].dataId; 161 | audio.src = playList[index].file; 162 | audio.preload = 'auto'; 163 | app.status.title = playList[index].title; 164 | } 165 | }, 500) 166 | } 167 | 168 | document.getElementsByClassName("container")[0].onscroll = function () { 169 | if (loaded == 0) loaded = 80; 170 | if (this.scrollTop > this.scrollHeight - this.clientHeight - 100) { 171 | for (let i = loaded; i < loaded + 50; i++) { 172 | if (app.playlist[i] && app.playlist[i].hide == false) app.playlist[i].hide = true; 173 | } 174 | for (let i = 0; i < document.querySelectorAll('.music-el').length; i++) { 175 | document.querySelector("#pl").addEventListener('click', listHandler, false); 176 | } 177 | loaded = loaded + 50; 178 | } 179 | }; 180 | 181 | function listHandler(evt) { 182 | youtubeRadio = false; 183 | evt.preventDefault(); 184 | let aw = evt.target.className; 185 | if (aw == 'pl-title') { 186 | let current = parseInt(evt.target.parentNode.getAttribute('data-track'), 10); 187 | index = current; 188 | if (playList[index].need) { 189 | require('electron').shell.openExternal(`https://www.youtube.com/watch?v=${playList[index].videoId}`) 190 | return; 191 | } 192 | parseInt(evt.target.parentNode.getAttribute('real-id'), 10); 193 | audio.readyState = 0; 194 | plActive(); 195 | play(); 196 | const ColorThief = require('colorthief'); 197 | const img = decodeURI(playList[index].icon); 198 | 199 | ColorThief.getPalette(img, 2) 200 | .then(color => { 201 | document.documentElement.style.setProperty('--purple', `rgb(${color[0][0]}, ${color[0][1]}, ${color[0][2]})`); 202 | document.documentElement.style.setProperty('--red', `rgb(${color[1][0]}, ${color[1][1]}, ${color[1][2]})`); 203 | }) 204 | .catch(err => { console.log(err) }) 205 | } else { 206 | let target = evt.target; 207 | if (target.className === 'fas fa-heart owo' || target.className === 'fas fa-heart owo fav' || target.className == 'right') return; 208 | while (target.className !== pl.className) { 209 | if (target.className === 'pl-remove' || target.className === 'pl-del' || target.className === 'right') { 210 | M.toast({ html: ` ${db().query("SELECT * from music WHERE id=" + parseInt(target.parentNode.getAttribute('real-id'), 10))[0].title}` }); 211 | db().run(`DELETE from music where id=${parseInt(target.parentNode.getAttribute('real-id'), 10)}`); 212 | console.log(app.playlist[parseInt(target.parentNode.getAttribute('data-track'), 10)]); 213 | try { 214 | fs.unlinkSync(app.playlist[parseInt(target.parentNode.getAttribute('data-track'), 10)].file) 215 | //file removed 216 | } catch (err) { 217 | console.error(err) 218 | } 219 | if (!isLoved) { refresh(); } else { openloved(); }; 220 | let isDel = parseInt(target.parentNode.getAttribute('data-track'), 10); 221 | if (!audio.paused) { 222 | if (isDel === index) { 223 | play(); 224 | } 225 | } else { 226 | if (isEmptyList()) { 227 | empty(); 228 | } else { 229 | audio.src = playList[index].file; 230 | document.title = trackTitle.innerHTML = playList[index].title; 231 | progressBar.style.width = 0; 232 | } 233 | } 234 | if (isDel < index) { 235 | index--; 236 | } 237 | return; 238 | } 239 | target = target.parentNode; 240 | } 241 | } 242 | } 243 | 244 | function plActive() { 245 | plHtml = document.querySelectorAll('.music-el'); 246 | if (audio.paused) { 247 | if (document.querySelector(".pl-current")) plHtml[index].classList.remove('pl-current'); 248 | return; 249 | } 250 | for (var i = 0, len = plHtml.length; len > i; i++) { 251 | plHtml[i].classList.remove('pl-current'); 252 | } 253 | if (plHtml[index]) plHtml[index].classList.add('pl-current'); 254 | } 255 | 256 | function error() { 257 | !isEmptyList() && next(); 258 | } 259 | 260 | function play() { 261 | if (wave) wave.destroy(); 262 | index = (index > playList.length - 1) ? 0 : index; 263 | index; 264 | if (index < 0) index = playList.length - 1; 265 | if (isEmptyList()) { 266 | empty(); 267 | return; 268 | } 269 | if (playList[index].file) audio.src = playList[index].file; 270 | audio.preload = 'auto'; 271 | document.title = app.status.title = playList[index].title; 272 | document.querySelector(`.ap`).style.background = `linear-gradient(rgba(0,0,0,.8), rgba(0,0,0,.8)), url('${app._data.playlist[AP.getIndex()].icon}') center center / cover`; 273 | audio.play(); 274 | playBtn.classList.add('playing'); 275 | plActive(); 276 | if (subtitles) getText(); 277 | if (app._data.playlist[AP.getIndex()].videoId == null && video) { 278 | axios.get("https://www.googleapis.com/youtube/v3/search?part=snippet&q=" + app._data.playlist[AP.getIndex()].title + "&type=video&maxResults=1&key=AIzaSyBBFxx0yqaUfX8V17A4M8UcAiOx-eKXYcs&videoEmbeddable=true") 279 | .then(res => { 280 | res.data.items.forEach(v => { 281 | if (v.id.kind == "youtube#video") { 282 | app._data.playlist[AP.getIndex()].videoId = v.id.videoId; 283 | } 284 | }) 285 | }) 286 | } 287 | } 288 | 289 | function prev() { 290 | youtubeRadio = false; 291 | if (random) return randomTrack(); 292 | index = index - 1; 293 | if (mini == true && ping > 1) { 294 | document.getElementById('hide-progres').style.width = `100%`; 295 | ping = 5; 296 | } 297 | notify(`Now playing`, app.playlist[index].title) 298 | play(); 299 | } 300 | 301 | function next() { 302 | youtubeRadio = false; 303 | if (random) return randomTrack(); 304 | index = index + 1; 305 | if (mini == true && ping > 1) { 306 | document.getElementById('hide-progres').style.width = `100%`; 307 | ping = 5; 308 | } 309 | if (app.playlist[index].title) notify(`Now playing`, app.playlist[index].title) 310 | play(); 311 | } 312 | 313 | function randomTrack() { 314 | youtubeRadio = false; 315 | if (app.playlist.length <= 1) return; 316 | index = getRandomInt(0, app.playlist.length); 317 | if (mini == true && ping > 1) { 318 | document.getElementById('hide-progres').style.width = `100%`; 319 | ping = 5; 320 | } 321 | if (app.playlist[index]) notify(`Now playing`, app.playlist[index].title) 322 | play(); 323 | } 324 | 325 | function isEmptyList() { 326 | return playList.length === 0; 327 | } 328 | 329 | function empty() { 330 | audio.pause(); 331 | audio.src = ''; 332 | app.status.title = 'Playlist is empty'; 333 | app.status.progress = ``; 334 | //pl.innerHTML = '
PlayList is empty
'; 335 | } 336 | 337 | 338 | function playToggle() { 339 | if (isEmptyList()) return; 340 | if (youtubeRadio) { 341 | radioPlayer.getPlayerState() === YT.PlayerState.PLAYING || radioPlayer.getPlayerState() === YT.PlayerState.BUFFERING ? radioPlayer.pauseVideo() : radioPlayer.playVideo(); 342 | return; 343 | }; 344 | if (audio.paused) { 345 | document.querySelector(`.ap`).style.background = `linear-gradient(rgba(0,0,0,.8), rgba(0,0,0,.8)), url('${app._data.playlist[AP.getIndex()].icon}') center center / cover`; 346 | audio.play(); 347 | playBtn.classList.add('playing'); 348 | } else { 349 | if (wave) wave.destroy(); 350 | audio.pause(); 351 | playBtn.classList.remove('playing'); 352 | } 353 | plActive(); 354 | } 355 | 356 | function volumeToggle() { 357 | if (audio.muted) { 358 | if (parseInt(volumeLength, 10) === 0) { 359 | volumeBar.style.height = '100%'; 360 | audio.volume = 1; 361 | } else { volumeBar.style.height = volumeLength; }; 362 | audio.muted = false; 363 | this.classList.remove('muted'); 364 | } else { 365 | audio.muted = true; 366 | volumeBar.style.height = 0; 367 | this.classList.add('muted'); 368 | } 369 | } 370 | 371 | function repeatToggle() { 372 | var repeat = this.classList; 373 | if (repeat.contains('ap-active')) { 374 | repeating = false; 375 | repeat.remove('ap-active'); 376 | } else { 377 | repeating = true; 378 | repeat.add('ap-active'); 379 | } 380 | } 381 | 382 | let sync = null, 383 | radioId = null; 384 | 385 | function videoToggle() { 386 | var elem = document.querySelector(".video").classList; 387 | require('electron').ipcRenderer.send("embed"); 388 | if (elem.contains('ap-active')) { 389 | video = false; 390 | elem.remove('ap-active'); 391 | clearInterval(sync); 392 | } else { 393 | if (app._data.playlist[AP.getIndex()].videoId == null) { 394 | axios.get("https://www.googleapis.com/youtube/v3/search?part=snippet&q=" + app._data.playlist[AP.getIndex()].title + "&type=video&maxResults=1&key=AIzaSyBBFxx0yqaUfX8V17A4M8UcAiOx-eKXYcs&videoEmbeddable=true") 395 | .then(res => { 396 | res.data.items.forEach(v => { 397 | if (v.id.kind == "youtube#video") { 398 | app._data.playlist[AP.getIndex()].videoId = v.id.videoId; 399 | } 400 | }) 401 | }) 402 | } 403 | sync = setInterval(() => { 404 | fs.writeFileSync("now.json", JSON.stringify({ volume: audio.volume * 100, id: youtubeRadio ? radioId : app._data.playlist[AP.getIndex()].videoId, start: audio.currentTime, radio: youtubeRadio })); 405 | }, 100) 406 | video = true; 407 | elem.add('ap-active'); 408 | } 409 | } 410 | 411 | function videoOff() { 412 | var elem = document.querySelector(".video").classList; 413 | video = false; 414 | elem.remove('ap-active'); 415 | clearInterval(sync); 416 | } 417 | 418 | function randomToggle() { 419 | var randomel = document.querySelector(".randomToggle").classList; 420 | if (randomel.contains('ap-active')) { 421 | random = false; 422 | document.querySelector(".randomToggle").classList.remove('ap-active'); 423 | } else { 424 | random = true; 425 | document.querySelector(".randomToggle").classList.add('ap-active'); 426 | } 427 | } 428 | 429 | function subtitlesToggle() { 430 | if (document.querySelector(".subtitles").classList.contains('ap-active')) { 431 | subtitles = false; 432 | document.querySelector(`#snackbar`).style.display = "none"; 433 | document.querySelector(".subtitles").classList.remove('ap-active'); 434 | } else { 435 | subtitles = true; 436 | document.querySelector(`#snackbar`).style.display = "block"; 437 | document.querySelector(".subtitles").classList.add('ap-active'); 438 | } 439 | getText(); 440 | } 441 | 442 | function update() { 443 | if (audio.readyState === 0) return; 444 | var barlength = Math.round(audio.currentTime * (100 / audio.duration)); 445 | progressBar.style.width = barlength + '%'; 446 | var curMins = Math.floor(audio.currentTime / 60), 447 | curSecs = Math.floor(audio.currentTime - curMins * 60), 448 | mins = Math.floor(audio.duration / 60), 449 | secs = Math.floor(audio.duration - mins * 60); 450 | (curSecs < 10) && (curSecs = '0' + curSecs); 451 | (secs < 10) && (secs = '0' + secs); 452 | app.status.progress = `${curMins}:${curSecs}/${mins}:${secs}`; 453 | var buffered = audio.buffered; 454 | if (buffered.length) { 455 | var loaded = Math.round(100 * buffered.end(0) / audio.duration); 456 | preloadBar.style.width = loaded + '%'; 457 | } 458 | musicStatus.progress = barlength; 459 | musicStatus.curTime = `${curMins}:${curSecs}`; 460 | musicStatus.durTime = `${mins}:${secs}`; 461 | } 462 | 463 | function doEnd() { 464 | if (random) return randomTrack(); 465 | if (index == playList.length - 1) { 466 | if (!repeating) { 467 | audio.pause(); 468 | plActive(); 469 | playBtn.classList.remove('playing'); 470 | return; 471 | } else { 472 | index = 0; 473 | play(); 474 | } 475 | } else { 476 | if (!repeating) index = (index === playList.length - 1) ? 0 : index + 1; 477 | let title = app.playlist[index].title; 478 | notify(`Now playing`, title); 479 | play(); 480 | } 481 | } 482 | 483 | function moveBar(evt, el, dir) { 484 | var value; 485 | if (dir === 'horizontal') { 486 | value = Math.round((evt.clientX - el.offset().left) * 100 / el.parentNode.offsetWidth); 487 | el.style.width = value + '%'; 488 | return value; 489 | } else { 490 | var offset = el.offset().top + el.offsetHeight; 491 | value = Math.round((offset - evt.clientY)); 492 | if (value > 100) value = 100; 493 | if (value < 0) value = 0; 494 | volumeBar.style.height = value + '%'; 495 | return value; 496 | } 497 | } 498 | 499 | let timer; 500 | 501 | function volumeUp(value) { 502 | value = audio.volume * 100 + 2; 503 | if (value > 100) value = 100; 504 | if (value < 0) value = 0; 505 | volumeBar.style.height = value + '%'; 506 | audio.volume = Number(value / 100); 507 | if (mini == true) { 508 | app.status.title = `Volume: ${value.toFixed(0)}%`; 509 | clearTimeout(timer); 510 | timer = setTimeout(() => { 511 | app.status.title = playList[index].title; 512 | }, 750) 513 | } else { 514 | document.getElementsByClassName('ap-volume')[0].style.height = "120px"; 515 | document.getElementsByClassName('ap-volume')[0].style.visibility = "visible"; 516 | clearTimeout(timer); 517 | timer = setTimeout(() => { 518 | if (document.getElementsByClassName('ap-volume')[0].style.height == "120px") { 519 | document.getElementsByClassName('ap-volume')[0].style.height = null; 520 | document.getElementsByClassName('ap-volume')[0].style.visibility = null; 521 | } 522 | }, 1000) 523 | } 524 | } 525 | 526 | function volumeDown(value) { 527 | value = audio.volume * 100 - 2; 528 | if (value > 100) value = 100; 529 | if (value < 0) value = 0; 530 | volumeBar.style.height = value + '%'; 531 | audio.volume = Number(value / 100); 532 | if (mini == true) { 533 | app.status.title = `Volume: ${value.toFixed(0)}%`; 534 | clearTimeout(timer); 535 | timer = setTimeout(() => { 536 | app.status.title = playList[index].title; 537 | }, 750) 538 | } else { 539 | document.getElementsByClassName('ap-volume')[0].style.height = "120px"; 540 | document.getElementsByClassName('ap-volume')[0].style.visibility = "visible"; 541 | clearTimeout(timer); 542 | timer = setTimeout(() => { 543 | if (document.getElementsByClassName('ap-volume')[0].style.height == "120px") { 544 | document.getElementsByClassName('ap-volume')[0].style.height = null; 545 | document.getElementsByClassName('ap-volume')[0].style.visibility = null; 546 | } 547 | }, 1000) 548 | } 549 | } 550 | 551 | function handlerBar(evt) { 552 | rightClick = (evt.which === 3) ? true : false; 553 | seeking = true; 554 | seek(evt); 555 | } 556 | 557 | function handlerVol(evt) { 558 | rightClick = (evt.which === 3) ? true : false; 559 | seeking = true; 560 | setVolume(evt); 561 | } 562 | 563 | function seek(evt) { 564 | if (seeking && rightClick === false && audio.readyState !== 0) { 565 | var value = moveBar(evt, progressBar, 'horizontal'); 566 | audio.currentTime = audio.duration * (value / 100); 567 | } 568 | } 569 | 570 | function seekingFalse() { 571 | seeking = false; 572 | } 573 | 574 | function setIndex(value) { 575 | index = value; 576 | } 577 | 578 | function getIndex() { 579 | return index; 580 | } 581 | 582 | function setVolume(evt) { 583 | volumeLength = volumeBar.css('height'); 584 | if (seeking && rightClick === false) { 585 | musicStatus.volume = moveBar(evt, volumeBar.parentNode, 'vertical') / 100; 586 | var value = moveBar(evt, volumeBar.parentNode, 'vertical') / 100; 587 | if (value <= 0) { 588 | audio.volume = 0; 589 | volumeBtn.classList.add('muted'); 590 | } else { 591 | if (audio.muted) audio.muted = false; 592 | audio.volume = value; 593 | volumeBtn.classList.remove('muted'); 594 | } 595 | } 596 | } 597 | 598 | function radio(id) { 599 | if (!id) { 600 | $(".menu-left").removeClass('act-menu'); 601 | $(".shadow").hide(); 602 | document.querySelector(".radio-choise").style.display = "flex"; 603 | setTimeout(() => { document.querySelector(".radio-choise").classList.toggle("active"); }, 100) 604 | return; 605 | } 606 | id = id.split(`v=`)[1]; 607 | console.log(id); 608 | radioId = id; 609 | document.querySelector(".radio-choise").classList.toggle("active"); 610 | setTimeout(() => { document.querySelector(".radio-choise").style.display = "none"; }, 100) 611 | if (!audio.paused) { 612 | audio.pause(); 613 | playBtn.classList.remove('playing'); 614 | } 615 | plActive(); 616 | axios.get(`https://www.googleapis.com/youtube/v3/videos?part=snippet&&id=${id}&key=AIzaSyBBFxx0yqaUfX8V17A4M8UcAiOx-eKXYcs`) 617 | .then(res => { 618 | console.log(res.data) 619 | app.status.title = res.data.items[0].snippet.title; 620 | document.querySelector(`.ap`).style.background = `linear-gradient(rgba(0,0,0,.8), rgba(0,0,0,.8)), url('${res.data.items[0].snippet.thumbnails.maxres.url}') center center / cover`; 621 | app.status.progress = ``; 622 | }) 623 | youtubeRadio = true; 624 | document.querySelector(".ap--play").style.display = "none"; 625 | document.querySelector(".ap--pause").style.display = "none"; 626 | document.querySelector(".ap-progress-container").style.display = "none"; 627 | if (!document.getElementById("youtube-player")) { 628 | var e = document.getElementById("youtube-audio"), 629 | t = document.createElement("img"); 630 | t.setAttribute("id", "youtube-icon"), t.style.cssText = "cursor:pointer;cursor:hand", e.appendChild(t); 631 | var a = document.createElement("div"); 632 | a.setAttribute("id", "youtube-player"), e.appendChild(a); 633 | var o = function (e) { 634 | var a = e ? "IDzX9gL.png" : "quyUPXN.png"; 635 | t.setAttribute("src", "https://i.imgur.com/" + a) 636 | }; 637 | e.onclick = function () { 638 | radioPlayer.getPlayerState() === YT.PlayerState.PLAYING || radioPlayer.getPlayerState() === YT.PlayerState.BUFFERING ? (radioPlayer.pauseVideo(), o(!1)) : (radioPlayer.playVideo(), o(!0)) 639 | }; 640 | radioPlayer = new YT.Player("youtube-player", { 641 | height: "0", 642 | width: "0", 643 | videoId: id, 644 | playerVars: { 645 | autoplay: 1, 646 | loop: 1 647 | }, 648 | events: { 649 | onReady: function (ee) { 650 | setInterval(() => { 651 | if (!youtubeRadio && e.style.display != "none") { 652 | e.style.display = "none"; 653 | app.status.progress = ""; 654 | document.querySelector(".ap--play").style.display = null; 655 | document.querySelector(".ap--pause").style.display = null; 656 | document.querySelector(".ap-progress-container").style.display = null; 657 | radioPlayer.pauseVideo(); 658 | } 659 | radioPlayer.setVolume(parseFloat(audio.volume) * 100); 660 | }, 100) 661 | radioPlayer.setPlaybackQuality("small"), o(radioPlayer.getPlayerState() !== YT.PlayerState.CUED) 662 | }, 663 | onStateChange: function (e) { 664 | e.data === YT.PlayerState.ENDED && o(!1) 665 | } 666 | } 667 | }) 668 | } else { 669 | document.getElementById("youtube-audio").style.display = null; 670 | radioPlayer.loadVideoById(id); 671 | radioPlayer.playVideo(); 672 | } 673 | } 674 | 675 | function destroy() { 676 | if (!apActive) return; 677 | playBtn.removeEventListener('click', playToggle, false); 678 | volumeBtn.removeEventListener('click', volumeToggle, false); 679 | repeatBtn.removeEventListener('click', repeatToggle, false); 680 | progressBar.parentNode.parentNode.removeEventListener('mousedown', handlerBar, false); 681 | progressBar.parentNode.parentNode.removeEventListener('mousemove', seek, false); 682 | document.documentElement.removeEventListener('mouseup', seekingFalse, false); 683 | volumeBar.parentNode.parentNode.removeEventListener('mousedown', handlerVol, false); 684 | volumeBar.parentNode.parentNode.removeEventListener('mousemove', setVolume); 685 | document.documentElement.removeEventListener('mouseup', seekingFalse, false); 686 | prevBtn.removeEventListener('click', prev, false); 687 | nextBtn.removeEventListener('click', next, false); 688 | audio.removeEventListener('error', error, false); 689 | audio.removeEventListener('timeupdate', update, false); 690 | audio.removeEventListener('ended', doEnd, false); 691 | player.parentNode.removeChild(player); 692 | pl.removeEventListener('click', listHandler, false); 693 | pl.parentNode.removeChild(pl); 694 | audio.pause(); 695 | apActive = false; 696 | } 697 | 698 | function extend(defaults, options) { 699 | for (var name in options) { 700 | if (defaults.hasOwnProperty(name)) { 701 | defaults[name] = options[name]; 702 | } 703 | } 704 | return defaults; 705 | } 706 | 707 | function create(el, attr) { 708 | var element = document.createElement(el); 709 | if (attr) { 710 | for (var name in attr) { 711 | if (element[name] !== undefined) { 712 | element[name] = attr[name]; 713 | } 714 | } 715 | } 716 | return element; 717 | } 718 | Element.prototype.offset = function () { 719 | var el = this.getBoundingClientRect(), 720 | scrollLeft = window.pageXOffset || document.documentElement.scrollLeft, 721 | scrollTop = window.pageYOffset || document.documentElement.scrollTop; 722 | return { 723 | top: el.top + scrollTop, 724 | left: el.left + scrollLeft 725 | }; 726 | }; 727 | Element.prototype.css = function (attr) { 728 | if (typeof attr === 'string') { 729 | return getComputedStyle(this, '')[attr]; 730 | } else if (typeof attr === 'object') { 731 | for (var name in attr) { 732 | if (this.style[name] !== undefined) { 733 | this.style[name] = attr[name]; 734 | } 735 | } 736 | } 737 | }; 738 | 739 | return { videoOff: videoOff, getIndex: getIndex, radio: radio, setIndex: setIndex, listHandler: listHandler, init: init, destroy: destroy, playToggle: playToggle, next: next, prev: prev, random: randomTrack, plActive: plActive, mute: volumeToggle, volumeUp: volumeUp, volumeDown: volumeDown }; 740 | })(); 741 | window.AP = AudioPlayer; 742 | } 743 | 744 | function refresh() { 745 | document.querySelector(`.container`).scrollTo(0, 0); 746 | AP.init({ 747 | playList: db().query("SELECT * from music") 748 | }); 749 | 750 | loaded = 0; 751 | isLoved = false; 752 | } 753 | 754 | function lovethis() { 755 | if (document.getElementsByClassName('pl-current')[0]) { 756 | love(parseInt(document.getElementsByClassName('pl-current')[0].getAttribute('real-id'), 10), document.getElementsByClassName('owo')[document.getElementsByClassName('pl-current')[0].getAttribute('data-track')]); 757 | } else { 758 | love(app.playlist.filter(y => y.dataId == AP.getIndex())[0].id); 759 | } 760 | } 761 | 762 | function shuffle(arr) { 763 | var j, temp; 764 | for (var i = arr.length - 1; i > 0; i--) { 765 | j = Math.floor(Math.random() * (i + 1)); 766 | temp = arr[j]; 767 | arr[j] = arr[i]; 768 | arr[i] = temp; 769 | } 770 | return arr; 771 | } 772 | 773 | function love(id, el) { 774 | let track = db().query(`SELECT * from music where id=${id}`)[0]; 775 | if (track.loved == true) { 776 | db().run(`UPDATE music SET loved=false WHERE id=${id};`); 777 | if (el) el.classList.remove("fav"); 778 | notify('Removed from loved :c', `${track.title}`); 779 | if (isLoved == true) openloved(); 780 | } else { 781 | notify('Added to loved :3', `${track.title}`); 782 | if (el) el.classList.add("fav"); 783 | db().run(`UPDATE music SET loved=true WHERE id=${id};`); 784 | } 785 | } 786 | 787 | function openloved() { 788 | document.querySelector(`.container`).scrollTo(0, 0); 789 | isLoved = true; 790 | let lovedMas = []; 791 | 792 | db().query("SELECT * from music").forEach(l => { 793 | if (l.loved == true) lovedMas.push(l); 794 | }) 795 | 796 | AP.init({ 797 | playList: lovedMas 798 | }); 799 | 800 | loaded = 0; 801 | } 802 | 803 | function openMenu() { 804 | if (document.getElementsByClassName('menu-left')[0].className.indexOf('act-menu') == -1) { 805 | document.getElementsByClassName('menu-left')[0].classList.add('act-menu'); 806 | document.getElementsByClassName('shadow')[0].style.display = "block"; 807 | } else { 808 | document.getElementsByClassName('menu-left')[0].classList.remove('act-menu'); 809 | document.getElementsByClassName('shadow')[0].style.display = "none"; 810 | } 811 | } 812 | 813 | function hidetray() { 814 | remote.getCurrentWindow().minimize(); 815 | } 816 | 817 | function winowClose() { 818 | db().run(`UPDATE status set dataId='${AP.getIndex()}', volume='${musicStatus.volume ? musicStatus.volume : 0.1}', loved='${isLoved ? "true" : "false"}'`); 819 | window.close(); 820 | } 821 | 822 | function maxsize() { 823 | if (fullscreen == 0) { 824 | remote.getCurrentWindow().maximize(); 825 | fullscreen++; 826 | document.getElementsByClassName("maximize")[0].innerHTML = ``; 827 | } else { 828 | remote.getCurrentWindow().unmaximize(); 829 | fullscreen = 0; 830 | document.getElementsByClassName("maximize")[0].innerHTML = ``; 831 | } 832 | } 833 | 834 | function getRandomInt(min, max) { return Math.round(Math.random() * (max - min)) + min; }; 835 | 836 | $(document).on('click', 'a[href^="http"]', function (event) { 837 | event.preventDefault(); 838 | shell.openExternal(this.href); 839 | }); 840 | 841 | function rgbToHsl(r, g, b) { 842 | r /= 255, g /= 255, b /= 255; 843 | var max = Math.max(r, g, b), min = Math.min(r, g, b); 844 | var h, s, l = (max + min) / 2; 845 | 846 | if (max == min) { 847 | h = s = 0; // achromatic 848 | } else { 849 | var d = max - min; 850 | s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 851 | switch (max) { 852 | case r: h = (g - b) / d + (g < b ? 6 : 0); break; 853 | case g: h = (b - r) / d + 2; break; 854 | case b: h = (r - g) / d + 4; break; 855 | } 856 | h /= 6; 857 | } 858 | 859 | return [h, s, l]; 860 | } --------------------------------------------------------------------------------