mirror of https://github.com/FreeTubeApp/FreeTube
Huge Code Clean up and Small Issue Fixes
* Added ability for div.video to change size. This is needed because it fixes the issue of not being able to see the new menus later on when we might need to add more menus to the context menu. I also deleted display: inline block because it won't work since there's a float: right (always enforces display: block). * Removed display: inline-block * Converted from Typescript to JS... Even if this was supposed to be for Vue, there's no Vue module installed on this branch... * Added .code-workspace in .gitignore for those who use a vscode workspace. Also added .jsbeautifyrc to clean up the code. This is definitely a good idea when the project gets larger. * Formatted the entire codebase to use a single coding standard. * Added comment header to all files * Some things actually weren't formatted correctly, so I fixed those * Code fixup * Forgot to change API key * Fixed issue #136 * Fixed ft.logs
This commit is contained in:
parent
791b564509
commit
13567ad4af
|
@ -3,7 +3,7 @@
|
|||
"development": {
|
||||
"application/javascript": {
|
||||
"presets": [
|
||||
["env", { "targets": { "electron": "1.4" } }],
|
||||
["env", { "targets": { "electron-renderer": "1.4" } }],
|
||||
"react"
|
||||
],
|
||||
"plugins": ["transform-async-to-generator"],
|
||||
|
@ -13,7 +13,7 @@
|
|||
"production": {
|
||||
"application/javascript": {
|
||||
"presets": [
|
||||
["env", { "targets": { "electron": "1.4" } }],
|
||||
["env", { "targets": { "electron-renderer": "1.4" } }],
|
||||
"react"
|
||||
],
|
||||
"plugins": ["transform-async-to-generator"],
|
||||
|
|
|
@ -5,6 +5,7 @@ subscriptions\.db
|
|||
.vscode/
|
||||
.eslintrc*
|
||||
*.db
|
||||
*.code-workspace
|
||||
|
||||
electron-packager/win32-x64/FreeTube-win32-x64/
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"html": {
|
||||
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"],
|
||||
"brace_style": "collapse",
|
||||
"end_with_newline": true,
|
||||
"indent_char": " ",
|
||||
"indent_handlebars": true,
|
||||
"indent_inner_html": false,
|
||||
"indent_scripts": "keep",
|
||||
"indent_size": 4,
|
||||
"max_preserve_newlines": 10,
|
||||
"preserve_newlines": true,
|
||||
"unformatted": ["a", "span", "img", "code", "pre", "sub", "sup", "em", "strong", "b", "i", "u", "strike", "big", "small", "pre", "h1", "h2", "h3", "h4", "h5", "h6"], // List of tags that should not be reformatted
|
||||
"wrap_line_length": 0
|
||||
},
|
||||
"css": {
|
||||
"allowed_file_extensions": ["css", "scss", "sass", "less"],
|
||||
"end_with_newline": true,
|
||||
"indent_char": " ",
|
||||
"indent_size": 4,
|
||||
"newline_between_rules": true,
|
||||
"selector_separator": " ",
|
||||
"selector_separator_newline": true,
|
||||
"preserve_newlines": true,
|
||||
"max_preserve_newlines": 10
|
||||
},
|
||||
"js": {
|
||||
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
|
||||
"brace_style": "collapse",
|
||||
"break_chained_methods": false,
|
||||
"e4x": false,
|
||||
"end_with_newline": false,
|
||||
"indent_char": " ",
|
||||
"indent_level": 0,
|
||||
"indent_size": 4,
|
||||
"indent_with_tabs": false,
|
||||
"jslint_happy": true,
|
||||
"keep_array_indentation": false,
|
||||
"keep_function_indentation": false,
|
||||
"max_preserve_newlines": 0,
|
||||
"preserve_newlines": true,
|
||||
"space_after_anon_function": true,
|
||||
"space_before_conditional": true,
|
||||
"space_in_empty_paren": false,
|
||||
"space_in_paren": false,
|
||||
"unescape_strings": false,
|
||||
"wrap_line_length": 0
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "FreeTube",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -78,9 +78,7 @@
|
|||
"abab": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz",
|
||||
"integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4="
|
||||
},
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
|
@ -163,6 +161,11 @@
|
|||
"integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-font": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ansi-font/-/ansi-font-0.0.2.tgz",
|
||||
"integrity": "sha1-iQMBvVhBRi/TnAt3Ca/R9SUUMzE="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
|
@ -355,6 +358,11 @@
|
|||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"array-equal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
|
||||
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM="
|
||||
},
|
||||
"array-find-index": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
|
||||
|
@ -418,6 +426,11 @@
|
|||
"integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==",
|
||||
"dev": true
|
||||
},
|
||||
"async-limiter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
|
||||
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
|
@ -1347,6 +1360,11 @@
|
|||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"browser-process-hrtime": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz",
|
||||
"integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44="
|
||||
},
|
||||
"browserslist": {
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz",
|
||||
|
@ -1712,6 +1730,63 @@
|
|||
"htmlparser2": "~3.8.1",
|
||||
"jsdom": "^7.0.2",
|
||||
"lodash": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cssstyle": {
|
||||
"version": "0.2.37",
|
||||
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz",
|
||||
"integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"cssom": "0.3.x"
|
||||
}
|
||||
},
|
||||
"jsdom": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz",
|
||||
"integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"abab": "^1.0.0",
|
||||
"acorn": "^2.4.0",
|
||||
"acorn-globals": "^1.0.4",
|
||||
"cssom": ">= 0.3.0 < 0.4.0",
|
||||
"cssstyle": ">= 0.2.29 < 0.3.0",
|
||||
"escodegen": "^1.6.1",
|
||||
"nwmatcher": ">= 1.3.7 < 2.0.0",
|
||||
"parse5": "^1.5.1",
|
||||
"request": "^2.55.0",
|
||||
"sax": "^1.1.4",
|
||||
"symbol-tree": ">= 3.1.0 < 4.0.0",
|
||||
"tough-cookie": "^2.2.0",
|
||||
"webidl-conversions": "^2.0.0",
|
||||
"whatwg-url-compat": "~0.6.5",
|
||||
"xml-name-validator": ">= 2.0.1 < 3.0.0"
|
||||
}
|
||||
},
|
||||
"parse5": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz",
|
||||
"integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz",
|
||||
"integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"xml-name-validator": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz",
|
||||
"integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"chromium-pickle-js": {
|
||||
|
@ -1901,6 +1976,15 @@
|
|||
"integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
|
||||
"dev": true
|
||||
},
|
||||
"commonjs": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commonjs/-/commonjs-0.0.1.tgz",
|
||||
"integrity": "sha1-ZcUx3P9lZcp8ld38lmIricwClNU=",
|
||||
"requires": {
|
||||
"system": ">=0.0.1",
|
||||
"test": ">=0.0.5"
|
||||
}
|
||||
},
|
||||
"compare-version": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
|
||||
|
@ -2193,17 +2277,14 @@
|
|||
}
|
||||
},
|
||||
"cssom": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz",
|
||||
"integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=",
|
||||
"dev": true
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz",
|
||||
"integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog=="
|
||||
},
|
||||
"cssstyle": {
|
||||
"version": "0.2.37",
|
||||
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz",
|
||||
"integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.3.1.tgz",
|
||||
"integrity": "sha512-tNvaxM5blOnxanyxI6panOsnfiyLRj3HV4qjqqS45WPNS1usdYWRUQjqTEEELK73lpeP/1KoIGYUwrBn/VcECA==",
|
||||
"requires": {
|
||||
"cssom": "0.3.x"
|
||||
}
|
||||
|
@ -2230,6 +2311,16 @@
|
|||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"data-urls": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.0.tgz",
|
||||
"integrity": "sha512-ai40PPQR0Fn1lD2PPie79CibnlMN2AYiDhwFX/rZHVsxbs5kNJSjegqXIprhouGXlRdEnfybva7kqRGnB6mypA==",
|
||||
"requires": {
|
||||
"abab": "^1.0.4",
|
||||
"whatwg-mimetype": "^2.0.0",
|
||||
"whatwg-url": "^6.4.0"
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
|
||||
|
@ -2277,8 +2368,7 @@
|
|||
"deep-is": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||
},
|
||||
"defaults": {
|
||||
"version": "1.0.3",
|
||||
|
@ -2417,6 +2507,14 @@
|
|||
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
|
||||
"dev": true
|
||||
},
|
||||
"domexception": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
|
||||
"integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
|
||||
"requires": {
|
||||
"webidl-conversions": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"domhandler": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
|
||||
|
@ -4225,11 +4323,9 @@
|
|||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
},
|
||||
"escodegen": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz",
|
||||
"integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz",
|
||||
"integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==",
|
||||
"requires": {
|
||||
"esprima": "^3.1.3",
|
||||
"estraverse": "^4.2.0",
|
||||
|
@ -4241,15 +4337,12 @@
|
|||
"esprima": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
|
||||
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
|
@ -4262,15 +4355,12 @@
|
|||
"estraverse": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
|
||||
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"dev": true
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
|
||||
},
|
||||
"events": {
|
||||
"version": "1.1.1",
|
||||
|
@ -4382,8 +4472,7 @@
|
|||
"fast-levenshtein": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
||||
"dev": true
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.0.1",
|
||||
|
@ -5054,6 +5143,14 @@
|
|||
"integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=",
|
||||
"dev": true
|
||||
},
|
||||
"html-encoding-sniffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
|
||||
"integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
|
||||
"requires": {
|
||||
"whatwg-encoding": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"html-entities": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
|
||||
|
@ -5642,27 +5739,56 @@
|
|||
"optional": true
|
||||
},
|
||||
"jsdom": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz",
|
||||
"integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"version": "11.11.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.11.0.tgz",
|
||||
"integrity": "sha512-ou1VyfjwsSuWkudGxb03FotDajxAto6USAlmMZjE2lc0jCznt7sBWkhfRBRaWwbnmDqdMSTKTLT5d9sBFkkM7A==",
|
||||
"requires": {
|
||||
"abab": "^1.0.0",
|
||||
"acorn": "^2.4.0",
|
||||
"acorn-globals": "^1.0.4",
|
||||
"cssom": ">= 0.3.0 < 0.4.0",
|
||||
"cssstyle": ">= 0.2.29 < 0.3.0",
|
||||
"escodegen": "^1.6.1",
|
||||
"nwmatcher": ">= 1.3.7 < 2.0.0",
|
||||
"parse5": "^1.5.1",
|
||||
"request": "^2.55.0",
|
||||
"sax": "^1.1.4",
|
||||
"symbol-tree": ">= 3.1.0 < 4.0.0",
|
||||
"tough-cookie": "^2.2.0",
|
||||
"webidl-conversions": "^2.0.0",
|
||||
"whatwg-url-compat": "~0.6.5",
|
||||
"xml-name-validator": ">= 2.0.1 < 3.0.0"
|
||||
"abab": "^1.0.4",
|
||||
"acorn": "^5.3.0",
|
||||
"acorn-globals": "^4.1.0",
|
||||
"array-equal": "^1.0.0",
|
||||
"cssom": ">= 0.3.2 < 0.4.0",
|
||||
"cssstyle": ">= 0.3.1 < 0.4.0",
|
||||
"data-urls": "^1.0.0",
|
||||
"domexception": "^1.0.0",
|
||||
"escodegen": "^1.9.0",
|
||||
"html-encoding-sniffer": "^1.0.2",
|
||||
"left-pad": "^1.2.0",
|
||||
"nwsapi": "^2.0.0",
|
||||
"parse5": "4.0.0",
|
||||
"pn": "^1.1.0",
|
||||
"request": "^2.83.0",
|
||||
"request-promise-native": "^1.0.5",
|
||||
"sax": "^1.2.4",
|
||||
"symbol-tree": "^3.2.2",
|
||||
"tough-cookie": "^2.3.3",
|
||||
"w3c-hr-time": "^1.0.1",
|
||||
"webidl-conversions": "^4.0.2",
|
||||
"whatwg-encoding": "^1.0.3",
|
||||
"whatwg-mimetype": "^2.1.0",
|
||||
"whatwg-url": "^6.4.1",
|
||||
"ws": "^4.0.0",
|
||||
"xml-name-validator": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
|
||||
"integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ=="
|
||||
},
|
||||
"acorn-globals": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz",
|
||||
"integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==",
|
||||
"requires": {
|
||||
"acorn": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsesc": {
|
||||
|
@ -5817,6 +5943,11 @@
|
|||
"invert-kv": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"left-pad": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
|
||||
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA=="
|
||||
},
|
||||
"less": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz",
|
||||
|
@ -6005,7 +6136,6 @@
|
|||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prelude-ls": "~1.1.2",
|
||||
"type-check": "~0.3.2"
|
||||
|
@ -6060,8 +6190,7 @@
|
|||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
|
||||
},
|
||||
"lodash._reinterpolate": {
|
||||
"version": "3.0.0",
|
||||
|
@ -6135,6 +6264,11 @@
|
|||
"integrity": "sha1-YAYMxr1iW01FZ+wn3EXNG+nuwBI=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.sortby": {
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
|
||||
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
|
||||
},
|
||||
"lodash.template": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz",
|
||||
|
@ -6619,6 +6753,11 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"nwsapi": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.7.tgz",
|
||||
"integrity": "sha512-VZXniaaaORAXGCNsvUNefsKRQYk8zCzQZ57jalgrpHcU70OrAzKAiN/3plYtH/VPRmZeYyUzQiYfKzcMXC1g5Q=="
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
|
||||
|
@ -6706,7 +6845,6 @@
|
|||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
|
||||
"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"deep-is": "~0.1.3",
|
||||
"fast-levenshtein": "~2.0.4",
|
||||
|
@ -6885,11 +7023,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"parse5": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz",
|
||||
"integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
|
||||
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA=="
|
||||
},
|
||||
"parser-toolkit": {
|
||||
"version": "0.0.5",
|
||||
|
@ -6986,6 +7122,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"pn": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
|
||||
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA=="
|
||||
},
|
||||
"postcss": {
|
||||
"version": "5.2.18",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz",
|
||||
|
@ -7301,8 +7442,7 @@
|
|||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||
},
|
||||
"prepend-http": {
|
||||
"version": "1.0.4",
|
||||
|
@ -7683,6 +7823,24 @@
|
|||
"uuid": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"request-promise-core": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz",
|
||||
"integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=",
|
||||
"requires": {
|
||||
"lodash": "^4.13.1"
|
||||
}
|
||||
},
|
||||
"request-promise-native": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz",
|
||||
"integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=",
|
||||
"requires": {
|
||||
"request-promise-core": "1.1.1",
|
||||
"stealthy-require": "^1.1.0",
|
||||
"tough-cookie": ">=2.3.3"
|
||||
}
|
||||
},
|
||||
"require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
|
@ -8147,6 +8305,11 @@
|
|||
"integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=",
|
||||
"dev": true
|
||||
},
|
||||
"stealthy-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
|
||||
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
|
||||
},
|
||||
"stream-json": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/stream-json/-/stream-json-0.6.1.tgz",
|
||||
|
@ -8368,9 +8531,7 @@
|
|||
"symbol-tree": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz",
|
||||
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
|
||||
},
|
||||
"synchronous-promise": {
|
||||
"version": "1.0.18",
|
||||
|
@ -8378,6 +8539,11 @@
|
|||
"integrity": "sha512-UqMAK6BBBXu8qaDI5omlyV9iDpM9nQfgthaBOK0nlfXnMgiuOBv+meWG73CGeCCFRhOOOa2e4rvqYzfynzy5zg==",
|
||||
"dev": true
|
||||
},
|
||||
"system": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/system/-/system-2.0.1.tgz",
|
||||
"integrity": "sha512-BwSUSa8LMHZouGadZ34ck3TsrH5s3oMmTKPK+xHdbBnTCZOZMJ38fHGKLAHkBl0PXru1Z4BsymQU4qqvTxWzdQ=="
|
||||
},
|
||||
"tabtab": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tabtab/-/tabtab-2.2.2.tgz",
|
||||
|
@ -8596,6 +8762,14 @@
|
|||
"lazy-val": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/test/-/test-0.6.0.tgz",
|
||||
"integrity": "sha1-WYasRF7Bd1QyJRLRBLoyyKY+k44=",
|
||||
"requires": {
|
||||
"ansi-font": "0.0.2"
|
||||
}
|
||||
},
|
||||
"thenify": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
|
||||
|
@ -8759,11 +8933,19 @@
|
|||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
|
||||
"integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
|
||||
"requires": {
|
||||
"punycode": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"transformers": {
|
||||
"version": "2.1.0",
|
||||
|
@ -8865,7 +9047,6 @@
|
|||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
||||
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prelude-ls": "~1.1.2"
|
||||
}
|
||||
|
@ -9102,6 +9283,14 @@
|
|||
"integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==",
|
||||
"dev": true
|
||||
},
|
||||
"w3c-hr-time": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
|
||||
"integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=",
|
||||
"requires": {
|
||||
"browser-process-hrtime": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
@ -9112,11 +9301,39 @@
|
|||
}
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz",
|
||||
"integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||
"integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="
|
||||
},
|
||||
"whatwg-encoding": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz",
|
||||
"integrity": "sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw==",
|
||||
"requires": {
|
||||
"iconv-lite": "0.4.19"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": {
|
||||
"version": "0.4.19",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"whatwg-mimetype": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz",
|
||||
"integrity": "sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew=="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
|
||||
"integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
|
||||
"requires": {
|
||||
"lodash.sortby": "^4.7.0",
|
||||
"tr46": "^1.0.1",
|
||||
"webidl-conversions": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"whatwg-url-compat": {
|
||||
"version": "0.6.5",
|
||||
|
@ -9126,6 +9343,15 @@
|
|||
"optional": true,
|
||||
"requires": {
|
||||
"tr46": "~0.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"whet.extend": {
|
||||
|
@ -9190,8 +9416,7 @@
|
|||
"wordwrap": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
|
||||
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
|
||||
"dev": true
|
||||
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
|
@ -9214,12 +9439,19 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ws": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz",
|
||||
"integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==",
|
||||
"requires": {
|
||||
"async-limiter": "~1.0.0",
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"xml-name-validator": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz",
|
||||
"integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
|
||||
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.17",
|
||||
|
|
|
@ -86,11 +86,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"autolinker": "^1.6.2",
|
||||
"commonjs": "0.0.1",
|
||||
"dateformat": "^3.0.3",
|
||||
"electron-compile": "6.4.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"github-version-checker": "^2.0.1",
|
||||
"jquery": "^3.3.1",
|
||||
"jsdom": "^11.11.0",
|
||||
"mustache": "^2.3.0",
|
||||
"nedb": "^1.8.0",
|
||||
"opml-to-json": "0.0.3",
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
<link rel="stylesheet" href="style/loading.css">
|
||||
<link rel="stylesheet" href="style/fa-solid.min.css">
|
||||
<link rel="stylesheet" href="style/fontawesome-all.min.css">
|
||||
|
||||
<script src="js/general.js"></script>
|
||||
<script src="js/youtubeApi.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/updates.js"></script>
|
||||
<script src="js/layout.js"></script>
|
||||
<script src="js/videos.js"></script>
|
||||
<script src="js/layout.js"></script>
|
||||
<script src="js/player.js"></script>
|
||||
<script src="js/subscriptions.js"></script>
|
||||
<script src="js/channels.js"></script>
|
||||
|
@ -47,9 +49,8 @@
|
|||
<input id='search' class="search" type="text" placeholder="Search / Go to URL">
|
||||
<i onclick='parseSearchText()' class="fas fa-search searchButton" style='margin-right: -10px; cursor: pointer'></i>
|
||||
</div>
|
||||
<img src='icons/iconBlack.png' id='menuIcon'/>
|
||||
|
||||
<img src='icons/textBlack.png' id='menuText'/>
|
||||
<img src='icons/iconBlack.png' id='menuIcon' />
|
||||
<img src='icons/textBlack.png' id='menuText' />
|
||||
</div>
|
||||
<div id='sideNavDisabled'></div>
|
||||
<div id="sideNav">
|
||||
|
@ -57,7 +58,7 @@
|
|||
<ul>
|
||||
<li onclick='loadSubscriptions()'><i class="fas fa-rss"></i> Subscriptions</li>
|
||||
<li onclick='showMostPopular()'><i class="fas fa-users"></i> Most Popular</li>
|
||||
<li onclick='showSavedVideos()'><i class="fas fa-star"></i> Saved</li>
|
||||
<li onclick='showSavedVideos()'><i class="fas fa-star"></i> Favorites</li>
|
||||
<li onclick='showHistory()'><i class="fas fa-history"></i> History</li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* File for all functions related specifically for channels.
|
||||
*/
|
||||
* File for all functions related specifically for channels.
|
||||
*/
|
||||
|
||||
/*function getChannelThumbnail(channelId, callback) {
|
||||
let url = '';
|
||||
|
@ -33,12 +33,12 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
}*/
|
||||
|
||||
/**
|
||||
* Display a channel page, showing latest uploads.
|
||||
*
|
||||
* @param {string} channelId - The channel ID to display.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
* Display a channel page, showing latest uploads.
|
||||
*
|
||||
* @param {string} channelId - The channel ID to display.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function goToChannel(channelId) {
|
||||
event.stopPropagation();
|
||||
clearMainContainer();
|
||||
|
@ -54,7 +54,7 @@ function goToChannel(channelId) {
|
|||
youtubeAPI('channels', {
|
||||
part: 'snippet,brandingSettings,statistics',
|
||||
id: channelId,
|
||||
}, function (data){
|
||||
}, function (data) {
|
||||
const channelData = data.items[0];
|
||||
|
||||
const channelViewTemplate = require('./templates/channelView.html');
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
sit under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* File for events within application. Work needs to be done throughout the application
|
||||
* to use this style more. Please use this style going forward if possible.
|
||||
|
@ -26,7 +24,7 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
* Event when user clicks comment box,
|
||||
* and wants to show/display comments for the user.
|
||||
*/
|
||||
let showComments = function(event) {
|
||||
let showComments = function (event) {
|
||||
let comments = $('#comments');
|
||||
|
||||
if (comments.css('display') === 'none') {
|
||||
|
@ -36,7 +34,7 @@ let showComments = function(event) {
|
|||
'videoId': $('#comments').attr('data-video-id'),
|
||||
'part': 'snippet,replies',
|
||||
'maxResults': 100,
|
||||
}, function (data){
|
||||
}, function (data) {
|
||||
let comments = [];
|
||||
let items = data.items;
|
||||
|
||||
|
@ -63,19 +61,16 @@ let showComments = function(event) {
|
|||
/**
|
||||
* Play / Pause the video player upon click.
|
||||
*/
|
||||
let playPauseVideo = function(event) {
|
||||
let playPauseVideo = function (event) {
|
||||
let el = event.currentTarget;
|
||||
el.paused ? el.play() : el.pause();
|
||||
};
|
||||
|
||||
$('.videoPlayer').keypress((event) => {
|
||||
console.log(event.which);
|
||||
});
|
||||
|
||||
let videoShortcutHandler = function(event) {
|
||||
console.log(event.which);
|
||||
let videoShortcutHandler = function (event) {
|
||||
|
||||
let videoPlayer = $('.videoPlayer').get(0);
|
||||
if (typeof(videoPlayer) !== 'undefined' && !$('#jumpToInput').is(':focus') && !$('#search').is(':focus')){
|
||||
if (typeof (videoPlayer) !== 'undefined' && !$('#jumpToInput').is(':focus') && !$('#search').is(':focus')) {
|
||||
switch (event.which) {
|
||||
case 32:
|
||||
// Space Bar
|
||||
|
@ -106,21 +101,19 @@ let videoShortcutHandler = function(event) {
|
|||
// M Key
|
||||
event.preventDefault();
|
||||
let volume = videoPlayer.volume;
|
||||
console.log(volume);
|
||||
if (volume > 0){
|
||||
|
||||
if (volume > 0) {
|
||||
changeVolume(-1);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
changeVolume(1);
|
||||
}
|
||||
break;
|
||||
case 67:
|
||||
// C Key
|
||||
let subtitleMode = $('.videoPlayer').get(0).textTracks[0].mode;
|
||||
if (subtitleMode === 'hidden'){
|
||||
if (subtitleMode === 'hidden') {
|
||||
$('.videoPlayer').get(0).textTracks[0].mode = 'showing'
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$('.videoPlayer').get(0).textTracks[0].mode = 'hidden'
|
||||
}
|
||||
break;
|
||||
|
@ -198,11 +191,10 @@ let videoShortcutHandler = function(event) {
|
|||
}
|
||||
};
|
||||
|
||||
let fullscreenVideo = function(event){
|
||||
if (document.webkitFullscreenElement !== null){
|
||||
let fullscreenVideo = function (event) {
|
||||
if (document.webkitFullscreenElement !== null) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$('.videoPlayer').get(0).webkitRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
@ -212,6 +204,7 @@ let fullscreenVideo = function(event){
|
|||
* Bind click events
|
||||
* --------------------------
|
||||
*/
|
||||
|
||||
$(document).on('click', '#showComments', showComments);
|
||||
|
||||
$(document).on('click', '.videoPlayer', playPauseVideo);
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
let ft = {};
|
||||
|
||||
/**
|
||||
*
|
||||
* Use this function instead of console.log.
|
||||
* This function logs the date, time and presents the information in a readable format
|
||||
*
|
||||
* @param {*} data
|
||||
*
|
||||
* @returns {Void}
|
||||
*/
|
||||
ft.log = function (...data) {
|
||||
let currentTime = new Date();
|
||||
let time = currentTime.getDate() + "/" +
|
||||
(currentTime.getMonth() + 1) + "/" +
|
||||
currentTime.getFullYear() + "@" +
|
||||
currentTime.getHours() + ":" +
|
||||
currentTime.getMinutes() + ":" +
|
||||
currentTime.getSeconds();
|
||||
|
||||
console.log('[' + time + '] ' + '[FREETUBE]', data);
|
||||
}
|
|
@ -1,34 +1,34 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* File used for functions related to video history.
|
||||
*/
|
||||
* File used for functions related to video history.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a video to the history database file
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video to be saved.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function addToHistory(videoId){
|
||||
* Add a video to the history database file
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video to be saved.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function addToHistory(videoId) {
|
||||
const data = {
|
||||
videoId: videoId,
|
||||
timeWatched: new Date().getTime(),
|
||||
|
@ -37,39 +37,39 @@ function addToHistory(videoId){
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove a video from the history database file
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video to be removed.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeFromHistory(videoId){
|
||||
const data = {videoId: videoId};
|
||||
* Remove a video from the history database file
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video to be removed.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeFromHistory(videoId) {
|
||||
const data = {
|
||||
videoId: videoId
|
||||
};
|
||||
historyDb.remove(data, {}, (err, numRemoved) => {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the videos within the history database.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function showHistory(){
|
||||
* Show the videos within the history database.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function showHistory() {
|
||||
clearMainContainer();
|
||||
startLoadingAnimation();
|
||||
console.log('checking history');
|
||||
|
||||
let videoList = '';
|
||||
|
||||
historyDb.find({}).sort({
|
||||
timeWatched: -1
|
||||
}).exec((err, docs) => {
|
||||
if(docs.length > 49){
|
||||
if (docs.length > 49) {
|
||||
// The YouTube API limits the search to 50 videos, so grab 50 most recent.
|
||||
for (let i = 0; i < 49; i++) {
|
||||
videoList = videoList + ',' + docs[i]['videoId'];
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
docs.forEach((video) => {
|
||||
videoList = videoList + ',' + video['videoId'];
|
||||
});
|
||||
|
|
132
src/js/init.js
132
src/js/init.js
|
@ -1,28 +1,34 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* File used to initializing the application
|
||||
*/
|
||||
const {app, BrowserWindow, dialog, protocol} = require('electron');
|
||||
* File used to initializing the application
|
||||
*/
|
||||
const {
|
||||
app,
|
||||
BrowserWindow,
|
||||
dialog,
|
||||
protocol
|
||||
} = require('electron');
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
|
||||
let win;
|
||||
|
||||
protocol.registerStandardSchemes(['freetube']);
|
||||
|
@ -39,17 +45,21 @@ const isSecondInstance = app.makeSingleInstance((commandLine, workingDirectory)
|
|||
}
|
||||
});
|
||||
|
||||
if(require('electron-squirrel-startup') || isSecondInstance) app.quit();
|
||||
if (require('electron-squirrel-startup') || isSecondInstance) app.quit();
|
||||
|
||||
/**
|
||||
* Initialize the Electron application
|
||||
* 1. create the browser window
|
||||
* 2. load the index.html
|
||||
*/
|
||||
let init = function() {
|
||||
let init = function () {
|
||||
const Menu = require('electron').Menu;
|
||||
|
||||
win = new BrowserWindow({width: 1200, height: 800, autoHideMenuBar: true});
|
||||
win = new BrowserWindow({
|
||||
width: 1200,
|
||||
height: 800,
|
||||
autoHideMenuBar: true
|
||||
});
|
||||
|
||||
win.loadURL(url.format({
|
||||
pathname: path.join(__dirname, '../index.html'),
|
||||
|
@ -65,43 +75,77 @@ let init = function() {
|
|||
win = null;
|
||||
});
|
||||
|
||||
const template = [
|
||||
{
|
||||
const template = [{
|
||||
label: 'File',
|
||||
submenu: [
|
||||
{role: 'quit'}
|
||||
]
|
||||
submenu: [{
|
||||
role: 'quit'
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
{role: 'cut'},
|
||||
{role: 'copy', accelerator: "CmdOrCtrl+C", selector: "copy:" },
|
||||
{role: 'paste', accelerator: "CmdOrCtrl+V", selector: "paste:" },
|
||||
{role: 'pasteandmatchstyle'},
|
||||
{role: 'delete'},
|
||||
{role: 'selectall'}
|
||||
submenu: [{
|
||||
role: 'cut'
|
||||
},
|
||||
{
|
||||
role: 'copy',
|
||||
accelerator: "CmdOrCtrl+C",
|
||||
selector: "copy:"
|
||||
},
|
||||
{
|
||||
role: 'paste',
|
||||
accelerator: "CmdOrCtrl+V",
|
||||
selector: "paste:"
|
||||
},
|
||||
{
|
||||
role: 'pasteandmatchstyle'
|
||||
},
|
||||
{
|
||||
role: 'delete'
|
||||
},
|
||||
{
|
||||
role: 'selectall'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'View',
|
||||
submenu: [
|
||||
{role: 'reload'},
|
||||
{role: 'forcereload'},
|
||||
{role: 'toggledevtools'},
|
||||
{type: 'separator'},
|
||||
{role: 'resetzoom'},
|
||||
{role: 'zoomin'},
|
||||
{role: 'zoomout'},
|
||||
{type: 'separator'},
|
||||
{role: 'togglefullscreen'}
|
||||
submenu: [{
|
||||
role: 'reload'
|
||||
},
|
||||
{
|
||||
role: 'forcereload'
|
||||
},
|
||||
{
|
||||
role: 'toggledevtools'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
role: 'resetzoom'
|
||||
},
|
||||
{
|
||||
role: 'zoomin'
|
||||
},
|
||||
{
|
||||
role: 'zoomout'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
role: 'togglefullscreen'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
role: 'window',
|
||||
submenu: [
|
||||
{role: 'minimize'},
|
||||
{role: 'close'}
|
||||
submenu: [{
|
||||
role: 'minimize'
|
||||
},
|
||||
{
|
||||
role: 'close'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
@ -113,7 +157,7 @@ let init = function() {
|
|||
/**
|
||||
* Quit the application
|
||||
*/
|
||||
let allWindowsClosed = function() {
|
||||
let allWindowsClosed = function () {
|
||||
win.webContents.session.clearStorageData([], (data) => {});
|
||||
win.webContents.session.clearCache((data) => {});
|
||||
app.quit();
|
||||
|
@ -123,7 +167,7 @@ let allWindowsClosed = function() {
|
|||
* On Mac, when dock icon is clicked,
|
||||
* create a new window and launch the editor
|
||||
*/
|
||||
let active = function() {
|
||||
let active = function () {
|
||||
if (win === null) {
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If nsot, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ let dialog = electron.remote.dialog; // Used for opening file browser to export
|
|||
let toastTimeout; // Timeout for toast notifications.
|
||||
let mouseTimeout; // Timeout for hiding the mouse cursor on video playback
|
||||
|
||||
require.extensions['.html'] = function(module, filename) {
|
||||
require.extensions['.html'] = function (module, filename) {
|
||||
module.exports = fs.readFileSync(filename, 'utf8');
|
||||
};
|
||||
|
||||
|
@ -82,11 +82,11 @@ const settingsDb = new Datastore({
|
|||
// none are found.
|
||||
checkDefaultSettings();
|
||||
|
||||
require('electron').ipcRenderer.on('ping', function(event, message) {
|
||||
console.log(message);
|
||||
require('electron').ipcRenderer.on('ping', function (event, message) {
|
||||
ft.log(message);
|
||||
let url = message[1].replace('freetube://', '');
|
||||
parseSearchText(url);
|
||||
console.log(message);
|
||||
ft.log(message);
|
||||
});
|
||||
|
||||
// Open links externally by default
|
||||
|
@ -158,7 +158,7 @@ function startLoadingAnimation() {
|
|||
const searchBar = document.getElementById('search');
|
||||
|
||||
loading.style.display = 'inherit';
|
||||
if(sideNavDisabled !== null){
|
||||
if (sideNavDisabled !== null) {
|
||||
sideNavDisabled.style.display = 'inherit';
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ function stopLoadingAnimation() {
|
|||
const searchBar = document.getElementById('search');
|
||||
|
||||
loading.style.display = 'none';
|
||||
if(sideNavDisabled !== null){
|
||||
if (sideNavDisabled !== null) {
|
||||
sideNavDisabled.style.display = 'none';
|
||||
}
|
||||
|
||||
|
@ -271,10 +271,9 @@ function confirmFunction(message, performFunction, parameters = '') {
|
|||
confirmContainer.style.visibility = 'visible';
|
||||
|
||||
$(document).on('click', '#confirmYes', (event) => {
|
||||
if(parameters != ''){
|
||||
if (parameters != '') {
|
||||
performFunction(parameters);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
performFunction();
|
||||
}
|
||||
hideConfirmFunction();
|
||||
|
@ -300,7 +299,7 @@ function hideConfirmFunction() {
|
|||
function hideMouseTimeout() {
|
||||
$('.videoPlayer')[0].style.cursor = 'default';
|
||||
clearTimeout(mouseTimeout);
|
||||
mouseTimeout = window.setTimeout(function() {
|
||||
mouseTimeout = window.setTimeout(function () {
|
||||
$('.videoPlayer')[0].style.cursor = 'none';
|
||||
}, 3150);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -21,9 +21,9 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
* Video Comment Model
|
||||
*/
|
||||
export class comment {
|
||||
authorDisplayName: string;
|
||||
authorProfileImageUrl: string;
|
||||
authorChannelId: string;
|
||||
textDisplay: string;
|
||||
publishedAt: string;
|
||||
authorDisplayName;
|
||||
authorProfileImageUrl;
|
||||
authorChannelId;
|
||||
textDisplay;
|
||||
publishedAt;
|
||||
}
|
|
@ -1,33 +1,35 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import {comment} from "./comment.model";
|
||||
import {
|
||||
comment
|
||||
} from "./comment.model";
|
||||
|
||||
/**
|
||||
* Entire Comment Threads for a Video
|
||||
*/
|
||||
export class commentThread {
|
||||
videoId: ?string;
|
||||
nextPageToken: ?string;
|
||||
pageInfo: {
|
||||
totalResults: number,
|
||||
resultsPerPage: number
|
||||
videoId;
|
||||
nextPageToken;
|
||||
pageInfo = {
|
||||
totalResults,
|
||||
resultsPerPage
|
||||
};
|
||||
items: comment[];
|
||||
items;
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -29,11 +29,10 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
* @return {Void}
|
||||
*/
|
||||
function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
||||
if (useWindowPlayer === false){
|
||||
if (useWindowPlayer === false) {
|
||||
clearMainContainer();
|
||||
startLoadingAnimation();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
showToast('Getting video information. Please wait...')
|
||||
}
|
||||
|
||||
|
@ -67,10 +66,10 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
// Change the save button icon and text depending on if the user has saved the video or not.
|
||||
checkSavedVideo.then((results) => {
|
||||
if (results === false) {
|
||||
savedText = 'SAVE';
|
||||
savedText = 'FAVORITE';
|
||||
savedIconClass = 'far unsaved';
|
||||
} else {
|
||||
savedText = 'SAVED';
|
||||
savedText = 'UNFAVORITE';
|
||||
savedIconClass = 'fas saved';
|
||||
}
|
||||
});
|
||||
|
@ -78,8 +77,7 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
youtubeAPI('videos', {
|
||||
part: 'statistics',
|
||||
id: videoId,
|
||||
}, function(data) {
|
||||
console.log(data);
|
||||
}, function (data) {
|
||||
|
||||
// Figure out the width for the like/dislike bar.
|
||||
videoLikes = data['items'][0]['statistics']['likeCount'];
|
||||
|
@ -92,9 +90,6 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
* FreeTube calls youtube-dl to grab the direct video URL.
|
||||
*/
|
||||
youtubedlGetInfo(videoId, (info) => {
|
||||
console.log(info);
|
||||
|
||||
console.log(videoLikes);
|
||||
|
||||
channelId = info['author']['id'];
|
||||
let channelThumbnail = info['author']['avatar'];
|
||||
|
@ -120,22 +115,22 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
switch (videoUrls[key]['itag']) {
|
||||
case '18':
|
||||
video480p = decodeURIComponent(videoUrls[key]['url']);
|
||||
console.log(video480p);
|
||||
ft.log('480p Video: ', video480p);
|
||||
break;
|
||||
case '22':
|
||||
video720p = decodeURIComponent(videoUrls[key]['url']);
|
||||
console.log(video720p);
|
||||
ft.log('720p Video: ', video720p);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// Default to the embeded player if the URLs cannot be found.
|
||||
if (typeof(video720p) === 'undefined' && typeof(video480p) === 'undefined') {
|
||||
if (typeof (video720p) === 'undefined' && typeof (video480p) === 'undefined') {
|
||||
useEmbedPlayer = true;
|
||||
defaultQuality = 'EMBED';
|
||||
videoHtml = embedPlayer.replace(/\"\;/g, '"');
|
||||
showToast('Unable to get video file. Reverting to embeded player.');
|
||||
} else if (typeof(video720p) === 'undefined' && typeof(video480p) !== 'undefined') {
|
||||
} else if (typeof (video720p) === 'undefined' && typeof (video480p) !== 'undefined') {
|
||||
// Default to the 480p video if the 720p URL cannot be found.
|
||||
defaultUrl = video480p;
|
||||
defaultQuality = '480p';
|
||||
|
@ -151,8 +146,8 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
//videoHtml = '<video class="videoPlayer" type="application/x-mpegURL" onmousemove="hideMouseTimeout()" onmouseleave="removeMouseTimeout()" controls="" src="' + defaultUrl + '" poster="' + videoThumbnail + '" autoplay>';
|
||||
|
||||
|
||||
if (typeof(info.player_response.captions) === 'object') {
|
||||
if (typeof(info.player_response.captions.playerCaptionsTracklistRenderer.captionTracks) === 'object') {
|
||||
if (typeof (info.player_response.captions) === 'object') {
|
||||
if (typeof (info.player_response.captions.playerCaptionsTracklistRenderer.captionTracks) === 'object') {
|
||||
const videoSubtitles = info.player_response.captions.playerCaptionsTracklistRenderer.captionTracks;
|
||||
|
||||
videoSubtitles.forEach((subtitle) => {
|
||||
|
@ -219,7 +214,7 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
// Add the video to the user's history
|
||||
addToHistory(videoId);
|
||||
|
||||
if (useWindowPlayer){
|
||||
if (useWindowPlayer) {
|
||||
// Create a new browser window.
|
||||
const BrowserWindow = electron.remote.BrowserWindow;
|
||||
|
||||
|
@ -239,15 +234,14 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) {
|
|||
newWindow.loadURL('data:text/html;charset=UTF-8,' + encodeURIComponent(playerHeaderRender + rendered), {
|
||||
baseURLForDataURL: `file://${__dirname}/src`
|
||||
});
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$('#main').html(rendered);
|
||||
stopLoadingAnimation();
|
||||
|
||||
showVideoRecommendations(videoId);
|
||||
|
||||
// Hide subtitles by default
|
||||
if (typeof(info['subtitles']) !== 'undefined' && Object.keys(info['subtitles']).length > 0) {
|
||||
if (typeof (info['subtitles']) !== 'undefined' && Object.keys(info['subtitles']).length > 0) {
|
||||
let textTracks = $('.videoPlayer').get(0).textTracks;
|
||||
Object.keys(textTracks).forEach((track) => {
|
||||
textTracks[track].mode = 'hidden';
|
||||
|
@ -324,8 +318,8 @@ function changeQuality(videoHtml, qualityType, isEmbed = false) {
|
|||
|
||||
videoHtml = videoHtml.replace(/\"\;/g, '"');
|
||||
|
||||
console.log(videoHtml);
|
||||
console.log(isEmbed);
|
||||
ft.log('HTML Video: ', videoHtml);
|
||||
ft.log('(Is the video embeded?) isEmbed: ', isEmbed);
|
||||
|
||||
// The YouTube API creates 2 more iFrames. This is why a boolean value is sent
|
||||
// with the function.
|
||||
|
@ -333,8 +327,8 @@ function changeQuality(videoHtml, qualityType, isEmbed = false) {
|
|||
|
||||
const html5Player = document.getElementsByClassName('videoPlayer');
|
||||
|
||||
console.log(embedPlayer);
|
||||
console.log(html5Player);
|
||||
ft.log('Embeded Player Element: ', embedPlayer);
|
||||
ft.log('HTML5 Player Element: ', html5Player);
|
||||
|
||||
if (isEmbed && html5Player.length == 0) {
|
||||
// The embeded player is already playing. Return.
|
||||
|
|
|
@ -1,75 +1,74 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* File used for functions related to saving videos
|
||||
*/
|
||||
* File used for functions related to saving videos
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds a video to the user's saved video database.
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video that will be saved.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function addSavedVideo(videoId){
|
||||
* Adds a video to the user's saved video database.
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video that will be saved.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function addSavedVideo(videoId) {
|
||||
let checkIfSaved = videoIsSaved(videoId);
|
||||
|
||||
checkIfSaved.then((saved) => {
|
||||
if (saved === false){
|
||||
if (saved === false) {
|
||||
let data = {
|
||||
videoId: videoId,
|
||||
timeSaved: new Date().getTime(),
|
||||
};
|
||||
|
||||
savedVidsDb.insert(data, (err, newDoc) => {
|
||||
showToast('Video has been saved!');
|
||||
showToast('The video has been favorited!');
|
||||
});
|
||||
}
|
||||
else{
|
||||
showToast('Video already exists in saved file.')
|
||||
} else {
|
||||
showToast('The video has already been favorited!')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a video from the user's saved video database.
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video that will be removed.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeSavedVideo(videoId, string){
|
||||
* Removes a video from the user's saved video database.
|
||||
*
|
||||
* @param {string} videoId - The video ID of the video that will be removed.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeSavedVideo(videoId, string) {
|
||||
savedVidsDb.remove({
|
||||
videoId: videoId
|
||||
}, {}, (err, numRemoved) => {
|
||||
showToast('Video has been removed from saved list.');
|
||||
showToast('Video has been removed from the favorites list.');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the save video button styling and saved / remove a video based on the current status.
|
||||
*
|
||||
* @param {string} videoId - The video ID to toggle between.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
* Toggles the save video button styling and saved / remove a video based on the current status.
|
||||
*
|
||||
* @param {string} videoId - The video ID to toggle between.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function toggleSavedVideo(videoId) {
|
||||
event.stopPropagation();
|
||||
|
||||
|
@ -79,14 +78,14 @@ function toggleSavedVideo(videoId) {
|
|||
|
||||
checkIfSaved.then((results) => {
|
||||
if (results === false) {
|
||||
savedText.innerHTML = 'SAVED';
|
||||
savedText.innerHTML = 'UNFAVORITE';
|
||||
saveIcon.classList.remove('far');
|
||||
saveIcon.classList.remove('unsaved');
|
||||
saveIcon.classList.add('fas');
|
||||
saveIcon.classList.add('saved');
|
||||
addSavedVideo(videoId);
|
||||
} else {
|
||||
savedText.innerHTML = 'SAVE';
|
||||
savedText.innerHTML = 'FAVORITE';
|
||||
saveIcon.classList.remove('fas');
|
||||
saveIcon.classList.remove('saved');
|
||||
saveIcon.classList.add('far');
|
||||
|
@ -97,15 +96,17 @@ function toggleSavedVideo(videoId) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if a video was saved in the user's saved video database
|
||||
*
|
||||
* @param {string} videoId - The video ID to check
|
||||
*
|
||||
* @return {promise} - A boolean value if the video was found or not.
|
||||
*/
|
||||
* Checks if a video was saved in the user's saved video database
|
||||
*
|
||||
* @param {string} videoId - The video ID to check
|
||||
*
|
||||
* @return {promise} - A boolean value if the video was found or not.
|
||||
*/
|
||||
function videoIsSaved(videoId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
savedVidsDb.find({videoId: videoId}, (err, docs) => {
|
||||
savedVidsDb.find({
|
||||
videoId: videoId
|
||||
}, (err, docs) => {
|
||||
if (jQuery.isEmptyObject(docs)) {
|
||||
resolve(false);
|
||||
} else {
|
||||
|
@ -116,14 +117,14 @@ function videoIsSaved(videoId) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Displays a list of the user's saved videos.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function showSavedVideos(){
|
||||
* Displays a list of the user's saved videos.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function showSavedVideos() {
|
||||
clearMainContainer();
|
||||
startLoadingAnimation();
|
||||
console.log('checking saved videos');
|
||||
ft.log('Checking favorited videos');
|
||||
|
||||
let videoList = '';
|
||||
|
||||
|
@ -133,12 +134,11 @@ function showSavedVideos(){
|
|||
}).exec((err, docs) => {
|
||||
// The YouTube API requires a max of 50 videos to be shown. Don't show more than 50.
|
||||
// TODO: Allow the app to show more than 50 saved videos.
|
||||
if(docs.length > 49){
|
||||
if (docs.length > 49) {
|
||||
for (let i = 0; i < 49; i++) {
|
||||
videoList = videoList + ',' + docs[i].videoId;
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
docs.forEach((video) => {
|
||||
videoList = videoList + ',' + video.videoId;
|
||||
});
|
||||
|
@ -151,7 +151,7 @@ function showSavedVideos(){
|
|||
maxResults: 50,
|
||||
}, (data) => {
|
||||
// Render the videos to the screen
|
||||
createVideoListContainer('Saved Videos:');
|
||||
createVideoListContainer('Favorited Videos:');
|
||||
let grabDuration = getDuration(data.items);
|
||||
grabDuration.then((videoList) => {
|
||||
videoList.items.forEach((video) => {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -98,10 +98,12 @@ function checkDefaultSettings() {
|
|||
'useTor': false
|
||||
};
|
||||
|
||||
console.log(settingDefaults);
|
||||
ft.log('Default Settings: ', settingDefaults);
|
||||
|
||||
for (let key in settingDefaults){
|
||||
settingsDb.find({_id: key}, (err, docs) => {
|
||||
for (let key in settingDefaults) {
|
||||
settingsDb.find({
|
||||
_id: key
|
||||
}, (err, docs) => {
|
||||
if (jQuery.isEmptyObject(docs)) {
|
||||
newSetting = {
|
||||
_id: key,
|
||||
|
@ -110,11 +112,10 @@ function checkDefaultSettings() {
|
|||
|
||||
settingsDb.insert(newSetting);
|
||||
|
||||
if (key == 'theme'){
|
||||
if (key == 'theme') {
|
||||
setTheme('light');
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
switch (docs[0]['_id']) {
|
||||
case 'theme':
|
||||
setTheme(docs[0]['value']);
|
||||
|
@ -148,22 +149,22 @@ function updateSettings() {
|
|||
|
||||
apiKey = apiKeyBank[Math.floor(Math.random() * apiKeyBank.length)];
|
||||
|
||||
console.log(themeSwitch);
|
||||
ft.log('(Is the theme switch checked) themeSwitch: ', themeSwitch);
|
||||
|
||||
if (themeSwitch === true) {
|
||||
theme = 'dark';
|
||||
}
|
||||
|
||||
console.log(theme);
|
||||
ft.log('Theme: ', theme);
|
||||
|
||||
// Update default theme
|
||||
settingsDb.update({
|
||||
_id: 'theme'
|
||||
}, {
|
||||
value: theme
|
||||
}, {}, function(err, numReplaced) {
|
||||
console.log(err);
|
||||
console.log(numReplaced);
|
||||
}, {}, function (err, numReplaced) {
|
||||
ft.log('Error while updating theme: ', err);
|
||||
ft.log('Number replaced: ', numReplaced);
|
||||
});
|
||||
|
||||
// Update tor usage.
|
||||
|
@ -171,9 +172,9 @@ function updateSettings() {
|
|||
_id: 'useTor'
|
||||
}, {
|
||||
value: torSwitch
|
||||
}, {}, function(err, numReplaced) {
|
||||
console.log(err);
|
||||
console.log(numReplaced);
|
||||
}, {}, function (err, numReplaced) {
|
||||
ft.log('Error while connecting to tor: ', err);
|
||||
ft.log('Number replaced: ', numReplaced);
|
||||
useTor = torSwitch;
|
||||
});
|
||||
|
||||
|
@ -254,14 +255,14 @@ function setTheme(option) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Import Subscriptions from an OPML file.
|
||||
*
|
||||
* @param {string} subFile - The file location of the OPML file.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function importOpmlSubs(json){
|
||||
if(!json[0]['folder'].includes('YouTube')){
|
||||
* Import Subscriptions from an OPML file.
|
||||
*
|
||||
* @param {string} subFile - The file location of the OPML file.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function importOpmlSubs(json) {
|
||||
if (!json[0]['folder'].includes('YouTube')) {
|
||||
showToast('Invalid OPML File. Import is unsuccessful.');
|
||||
return;
|
||||
}
|
||||
|
@ -277,58 +278,58 @@ function importOpmlSubs(json){
|
|||
}
|
||||
|
||||
/**
|
||||
* Import a subscriptions file that the user provides.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function importSubscriptions(){
|
||||
* Import a subscriptions file that the user provides.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function importSubscriptions() {
|
||||
const appDatabaseFile = localDataStorage + '/subscriptions.db';
|
||||
|
||||
// Open user's file browser. Only show .db files.
|
||||
dialog.showOpenDialog({
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
{name: 'Database File', extensions: ['*']},
|
||||
]
|
||||
}, function(fileLocation){
|
||||
if(typeof(fileLocation) === 'undefined'){
|
||||
console.log('Import Aborted');
|
||||
filters: [{
|
||||
name: 'Database File',
|
||||
extensions: ['*']
|
||||
}, ]
|
||||
}, function (fileLocation) {
|
||||
if (typeof (fileLocation) === 'undefined') {
|
||||
ft.log('Import Aborted');
|
||||
return;
|
||||
}
|
||||
console.log(fileLocation);
|
||||
ft.log('File Location: ', fileLocation);
|
||||
let i = fileLocation[0].lastIndexOf('.');
|
||||
let fileType = (i < 0) ? '' : fileLocation[0].substr(i);
|
||||
console.log(fileType);
|
||||
ft.log('File Type: ', fileType);
|
||||
|
||||
/*if (fileType !== '.db'){
|
||||
showToast('Incorrect filetype. Import was unsuccessful.');
|
||||
return;
|
||||
}*/
|
||||
|
||||
fs.readFile(fileLocation[0], function(readErr, data){
|
||||
if(readErr){
|
||||
fs.readFile(fileLocation[0], function (readErr, data) {
|
||||
if (readErr) {
|
||||
showToast('Unable to read file. File may be corrupt or have invalid permissions.');
|
||||
throw readErr;
|
||||
}
|
||||
|
||||
if (data.includes("<opml")){
|
||||
getOpml(data, function (error, json){
|
||||
if (!error){
|
||||
if (data.includes("<opml")) {
|
||||
getOpml(data, function (error, json) {
|
||||
if (!error) {
|
||||
clearFile('subscriptions', false);
|
||||
importOpmlSubs(json['children'][0]['children']);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
else if (fileType !== '.db'){
|
||||
} else if (fileType !== '.db') {
|
||||
showToast('Incorrect file type. Import unsuccessful.');
|
||||
return;
|
||||
}
|
||||
|
||||
clearFile('subscriptions', false);
|
||||
|
||||
fs.writeFile(appDatabaseFile, data, function(writeErr){
|
||||
if(writeErr){
|
||||
fs.writeFile(appDatabaseFile, data, function (writeErr) {
|
||||
if (writeErr) {
|
||||
showToast('Unable to create file. Please check your permissions and try again.');
|
||||
throw writeErr;
|
||||
}
|
||||
|
@ -349,13 +350,13 @@ function exportSubscriptions() {
|
|||
const date = new Date();
|
||||
let dateMonth = date.getMonth() + 1;
|
||||
|
||||
if (dateMonth < 10){
|
||||
if (dateMonth < 10) {
|
||||
dateMonth = '0' + dateMonth;
|
||||
}
|
||||
|
||||
let dateDay = date.getDate();
|
||||
|
||||
if (dateDay < 10){
|
||||
if (dateDay < 10) {
|
||||
dateDay = '0' + dateDay;
|
||||
}
|
||||
|
||||
|
@ -369,17 +370,17 @@ function exportSubscriptions() {
|
|||
name: 'Database File',
|
||||
extensions: ['db']
|
||||
}, ]
|
||||
}, function(fileLocation) {
|
||||
console.log(fileLocation);
|
||||
if (typeof(fileLocation) === 'undefined') {
|
||||
console.log('Export Aborted');
|
||||
}, function (fileLocation) {
|
||||
ft.log('File Location: ', fileLocation);
|
||||
if (typeof (fileLocation) === 'undefined') {
|
||||
ft.log('Export Aborted');
|
||||
return;
|
||||
}
|
||||
fs.readFile(appDatabaseFile, function(readErr, data) {
|
||||
fs.readFile(appDatabaseFile, function (readErr, data) {
|
||||
if (readErr) {
|
||||
throw readErr;
|
||||
}
|
||||
fs.writeFile(fileLocation, data, function(writeErr) {
|
||||
fs.writeFile(fileLocation, data, function (writeErr) {
|
||||
if (writeErr) {
|
||||
throw writeErr;
|
||||
}
|
||||
|
@ -390,12 +391,12 @@ function exportSubscriptions() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Clear out the data in a file.
|
||||
*
|
||||
* @param {string} type - The type of file to be cleared.
|
||||
*/
|
||||
function clearFile(type, showMessage = true){
|
||||
console.log(type);
|
||||
* Clear out the data in a file.
|
||||
*
|
||||
* @param {string} type - The type of file to be cleared.
|
||||
*/
|
||||
function clearFile(type, showMessage = true) {
|
||||
ft.log('File Type: ', type);
|
||||
let dataBaseFile;
|
||||
|
||||
switch (type) {
|
||||
|
@ -414,12 +415,12 @@ function clearFile(type, showMessage = true){
|
|||
}
|
||||
|
||||
// Replace data with an empty string.
|
||||
fs.writeFile(dataBaseFile, '', function(err) {
|
||||
fs.writeFile(dataBaseFile, '', function (err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (showMessage){
|
||||
if (showMessage) {
|
||||
showToast('File has been cleared. Restart FreeTube to see the changes');
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -29,12 +29,12 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
* @return {Void}
|
||||
*/
|
||||
function addSubscription(channelId, useToast = true) {
|
||||
console.log(channelId);
|
||||
ft.log('Channel ID: ', channelId);
|
||||
// Request YouTube API
|
||||
youtubeAPI('channels', {
|
||||
part: 'snippet',
|
||||
id: channelId,
|
||||
}, function(data) {
|
||||
}, (data) => {
|
||||
const channelInfo = data['items'][0]['snippet'];
|
||||
const channelName = channelInfo['title'];
|
||||
const thumbnail = channelInfo['thumbnails']['high']['url'];
|
||||
|
@ -82,7 +82,7 @@ function loadSubscriptions() {
|
|||
showToast('Getting Subscriptions. Please wait...');
|
||||
const loading = document.getElementById('loading');
|
||||
|
||||
startLoadingAnimation()
|
||||
startLoadingAnimation();
|
||||
|
||||
let videoList = [];
|
||||
|
||||
|
@ -106,7 +106,7 @@ function loadSubscriptions() {
|
|||
maxResults: 15,
|
||||
order: 'date',
|
||||
}, (data) => {
|
||||
console.log(data);
|
||||
|
||||
videoList = videoList.concat(data.items);
|
||||
counter++;
|
||||
if (counter === results.length) {
|
||||
|
@ -122,6 +122,7 @@ function loadSubscriptions() {
|
|||
|
||||
// The YouTube website limits the subscriptions to 100 before grabbing more so we only show 100
|
||||
// to keep the app running at a good speed.
|
||||
|
||||
if (videoList.length < 50) {
|
||||
let grabDuration = getDuration(videoList.slice(0, 49));
|
||||
|
||||
|
@ -132,7 +133,7 @@ function loadSubscriptions() {
|
|||
stopLoadingAnimation();
|
||||
});
|
||||
} else {
|
||||
console.log(videoList);
|
||||
|
||||
let finishedList = [];
|
||||
let firstBatchDuration = getDuration(videoList.slice(0, 49));
|
||||
|
||||
|
@ -150,8 +151,7 @@ function loadSubscriptions() {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// import {freeTubeLog} from './events.js';
|
||||
|
||||
/*
|
||||
* A file for checking / managing updates
|
||||
*/
|
||||
|
||||
const updateChecker = require('github-version-checker');
|
||||
const updateChecker = require('github-version-checker');
|
||||
|
||||
const options = {
|
||||
const options = {
|
||||
token: 'USERACCESSTOKEN', // personal access token. Github will not allow commiting the access token, which is why this is blank.
|
||||
repo: 'freetube', // repository name
|
||||
owner: 'freetubeapp', // repository owner
|
||||
currentVersion: require('electron').remote.app.getVersion(), // your app's current version
|
||||
fetchTags: false // whether to fetch releases or tags
|
||||
};
|
||||
};
|
||||
|
||||
const openReleasePage = function(){
|
||||
const openReleasePage = function () {
|
||||
shell.openExternal('https://github.com/FreeTubeApp/FreeTube/releases');
|
||||
}
|
||||
}
|
||||
|
||||
/*function checkForUpdates() {
|
||||
updateChecker(options, function(error, update) { // callback function
|
||||
if (error){
|
||||
showToast('There was a problem with checking for updates');
|
||||
console.log(error);
|
||||
freeTubeLog(error);
|
||||
}
|
||||
if (update) { // print some update info if an update is available
|
||||
confirmFunction(update.name + ' is now available! Would you like to download the update?', openReleasePage);
|
||||
|
@ -50,7 +50,7 @@ along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
|||
});
|
||||
}*/
|
||||
|
||||
updateChecker(options, function(error, update) { // callback function
|
||||
updateChecker(options, function (error, update) { // callback function
|
||||
if (error) throw error;
|
||||
if (update) { // print some update info if an update is available
|
||||
confirmFunction(update.name + ' is now available! Would you like to download the update?', openReleasePage);
|
||||
|
|
133
src/js/videos.js
133
src/js/videos.js
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ function search(nextPageToken = '') {
|
|||
clearMainContainer();
|
||||
startLoadingAnimation();
|
||||
} else {
|
||||
console.log(nextPageToken);
|
||||
ft.log('Next page token: ', nextPageToken);
|
||||
showToast('Fetching results. Please wait...');
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ function search(nextPageToken = '') {
|
|||
part: 'id',
|
||||
pageToken: nextPageToken,
|
||||
maxResults: 25,
|
||||
}, function(data) {
|
||||
console.log(data);
|
||||
}, function (data) {
|
||||
ft.log('Search Data: ', data);
|
||||
|
||||
let channels = data.items.filter((item) => {
|
||||
if (item.id.kind === 'youtube#channel') {
|
||||
|
@ -65,22 +65,22 @@ function search(nextPageToken = '') {
|
|||
}
|
||||
});
|
||||
|
||||
console.log(channels);
|
||||
console.log(typeof(channels));
|
||||
console.log(playlists);
|
||||
ft.log('Channels: ', channels);
|
||||
ft.log('Typeof object above (channels) ^^', typeof (channels));
|
||||
ft.log('Playlists', playlists);
|
||||
|
||||
if(playlists.length > 0){
|
||||
if (playlists.length > 0) {
|
||||
//displayPlaylists(playlists);
|
||||
}
|
||||
|
||||
if(channels.length > 0){
|
||||
if (channels.length > 0) {
|
||||
displayChannels(channels);
|
||||
}
|
||||
|
||||
let grabDuration = getDuration(videos);
|
||||
|
||||
grabDuration.then((videoList) => {
|
||||
console.log(videoList);
|
||||
ft.log('Video Lists: ', videoList);
|
||||
videoList.items.forEach(displayVideo);
|
||||
});
|
||||
|
||||
|
@ -105,13 +105,13 @@ function getDuration(data) {
|
|||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (videoIdList === '') {
|
||||
if (typeof(data[i]['id']) === 'string') {
|
||||
if (typeof (data[i]['id']) === 'string') {
|
||||
videoIdList = data[i]['id'];
|
||||
} else {
|
||||
videoIdList = data[i]['id']['videoId'];
|
||||
}
|
||||
} else {
|
||||
if (typeof(data[i]['id']) === 'string') {
|
||||
if (typeof (data[i]['id']) === 'string') {
|
||||
videoIdList = videoIdList + ', ' + data[i]['id'];
|
||||
} else {
|
||||
videoIdList = videoIdList + ', ' + data[i]['id']['videoId'];
|
||||
|
@ -154,7 +154,7 @@ function displayVideo(video, listType = '') {
|
|||
const deleteHtml = () => {
|
||||
switch (listType) {
|
||||
case 'saved':
|
||||
return `<li onclick="removeSavedVideo('${videoId}'); showSavedVideos();">Remove Saved Video</li>`;
|
||||
return `<li onclick="removeSavedVideo('${videoId}'); showSavedVideos();">Remove From Favorites</li>`;
|
||||
case 'history':
|
||||
return `<li onclick="removeFromHistory('${videoId}'); showHistory();">Remove From History</li>`;
|
||||
}
|
||||
|
@ -191,24 +191,24 @@ function displayChannels(channels) {
|
|||
let channelIds;
|
||||
|
||||
channels.forEach((channel) => {
|
||||
if (typeof(channelIds) === 'undefined') {
|
||||
if (typeof (channelIds) === 'undefined') {
|
||||
channelIds = channel.id.channelId;
|
||||
} else {
|
||||
channelIds = channelIds + ',' + channel.id.channelId;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(channelIds);
|
||||
ft.log('Channel IDs: ', channelIds);
|
||||
|
||||
youtubeAPI('channels', {
|
||||
part: 'snippet,statistics',
|
||||
id: channelIds,
|
||||
}, function(data) {
|
||||
console.log(data);
|
||||
}, function (data) {
|
||||
ft.log('Channel Data: ', data);
|
||||
let items = data['items'].reverse();
|
||||
const videoListTemplate = require('./templates/channelList.html');
|
||||
|
||||
console.log(items);
|
||||
ft.log('Channel Items: ', items);
|
||||
|
||||
items.forEach((item) => {
|
||||
mustache.parse(videoListTemplate);
|
||||
|
@ -230,24 +230,24 @@ function displayPlaylists(playlists) {
|
|||
let playlistIds;
|
||||
|
||||
playlists.forEach((playlist) => {
|
||||
if (typeof(playlistIds) === 'undefined') {
|
||||
if (typeof (playlistIds) === 'undefined') {
|
||||
playlistIds = playlist.id.playlistId;
|
||||
} else {
|
||||
playlistIds = playlistIds + ',' + playlist.id.playlistId;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(playlistIds);
|
||||
ft.log('Playlist IDs: ', playlistIds);
|
||||
|
||||
youtubeAPI('playlists', {
|
||||
part: 'snippet,contentDetails',
|
||||
id: playlistIds,
|
||||
}, function(data) {
|
||||
console.log(data);
|
||||
}, function (data) {
|
||||
ft.log('Playlist Data: ', data);
|
||||
let items = data['items'].reverse();
|
||||
const playlistListTemplate = require('./templates/playlistList.html');
|
||||
|
||||
console.log(items);
|
||||
ft.log('Playlist Items: ', items);
|
||||
|
||||
items.forEach((item) => {
|
||||
let dateString = new Date(item.snippet.publishedAt);
|
||||
|
@ -308,7 +308,7 @@ function showVideoRecommendations(videoId) {
|
|||
type: 'video',
|
||||
relatedToVideoId: videoId,
|
||||
maxResults: 15,
|
||||
}, function(data) {
|
||||
}, function (data) {
|
||||
let grabDuration = getDuration(data.items);
|
||||
grabDuration.then((videoList) => {
|
||||
videoList.items.forEach((video) => {
|
||||
|
@ -341,10 +341,9 @@ function showVideoRecommendations(videoId) {
|
|||
function parseSearchText(url = '') {
|
||||
let input;
|
||||
|
||||
if (url === ''){
|
||||
if (url === '') {
|
||||
input = document.getElementById('search').value;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
input = url;
|
||||
}
|
||||
|
||||
|
@ -357,30 +356,27 @@ function parseSearchText(url = '') {
|
|||
|
||||
let match = input.match(rx);
|
||||
|
||||
console.log(match);
|
||||
ft.log('Video ID: ', match);
|
||||
let urlSplit = input.split('/');
|
||||
if(match){
|
||||
console.log('Video found');
|
||||
if (match) {
|
||||
ft.log('Video found');
|
||||
playVideo(match[2]);
|
||||
}
|
||||
else if (urlSplit[3] == 'channel'){
|
||||
console.log('channel found');
|
||||
} else if (urlSplit[3] == 'channel') {
|
||||
ft.log('channel found');
|
||||
goToChannel(urlSplit[4]);
|
||||
}
|
||||
else if (urlSplit[3] == 'user'){
|
||||
console.log('user found');
|
||||
} else if (urlSplit[3] == 'user') {
|
||||
ft.log('user found');
|
||||
// call api to get the ID and then call goToChannel(id)
|
||||
youtubeAPI('channels', {
|
||||
part: 'id',
|
||||
forUsername: urlSplit[4]
|
||||
}, (data) => {
|
||||
console.log(data.items[0].id);
|
||||
ft.log('Channel Data: ', data.items[0].id);
|
||||
let channelID = data.items[0].id;
|
||||
goToChannel(channelID);
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log('Video not found');
|
||||
} else {
|
||||
ft.log('Video not found');
|
||||
search();
|
||||
}
|
||||
|
||||
|
@ -398,7 +394,7 @@ function parseVideoDuration(durationString) {
|
|||
let match = durationString.match(/PT(\d+H)?(\d+M)?(\d+S)?/);
|
||||
let duration = '';
|
||||
|
||||
match = match.slice(1).map(function(x) {
|
||||
match = match.slice(1).map(function (x) {
|
||||
if (x != null) {
|
||||
return x.replace(/\D/, '');
|
||||
}
|
||||
|
@ -456,13 +452,13 @@ function showMostPopular() {
|
|||
type: 'video',
|
||||
publishedAfter: d.toISOString(),
|
||||
maxResults: 50,
|
||||
}, function(data) {
|
||||
}, function (data) {
|
||||
createVideoListContainer('Most Popular:');
|
||||
console.log(data);
|
||||
ft.log('Most Popular: ', data);
|
||||
let grabDuration = getDuration(data.items);
|
||||
|
||||
grabDuration.then((videoList) => {
|
||||
console.log(videoList);
|
||||
ft.log('Video List: ', videoList);
|
||||
videoList.items.forEach(displayVideo);
|
||||
});
|
||||
stopLoadingAnimation();
|
||||
|
@ -470,7 +466,7 @@ function showMostPopular() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a link of the video to HookTube or YouTube and copy it to the user's clipboard.
|
||||
* Create a link of the video to Invidious or YouTube and copy it to the user's clipboard.
|
||||
*
|
||||
* @param {string} website - The website to watch the video on.
|
||||
* @param {string} videoId - The video ID of the video to add to the URL
|
||||
|
@ -479,9 +475,20 @@ function showMostPopular() {
|
|||
*/
|
||||
function copyLink(website, videoId) {
|
||||
// Create the URL and copy to the clipboard.
|
||||
if (website == "youtube") {
|
||||
const url = 'https://' + website + '.com/watch?v=' + videoId;
|
||||
clipboard.writeText(url);
|
||||
showToast('URL has been copied to the clipboard');
|
||||
}
|
||||
|
||||
if (website == "invidious") {
|
||||
website = "invidio";
|
||||
const url = "https://" + website + ".us/watch?v=" + videoId;
|
||||
clipboard.writeText(url);
|
||||
showToast('URL has been copied to the clipboard');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -492,12 +499,12 @@ function copyLink(website, videoId) {
|
|||
* @return {promise} - The HTML of the embeded player
|
||||
*/
|
||||
function getChannelAndPlayer(videoId) {
|
||||
console.log(videoId);
|
||||
ft.log('Video ID: ', videoId);
|
||||
return new Promise((resolve, reject) => {
|
||||
youtubeAPI('videos', {
|
||||
part: 'snippet,player',
|
||||
id: videoId,
|
||||
}, function(data) {
|
||||
}, function (data) {
|
||||
let embedHtml = data.items[0].player.embedHtml;
|
||||
embedHtml = embedHtml.replace('src="', 'src="https:');
|
||||
embedHtml = embedHtml.replace('width="480px"', '');
|
||||
|
@ -522,7 +529,7 @@ function checkVideoUrls(video480p, video720p) {
|
|||
|
||||
let valid480 = false;
|
||||
|
||||
if (typeof(video480p) !== 'undefined') {
|
||||
if (typeof (video480p) !== 'undefined') {
|
||||
let get480pUrl = fetch(video480p);
|
||||
get480pUrl.then((status) => {
|
||||
switch (status.status) {
|
||||
|
@ -544,8 +551,8 @@ function checkVideoUrls(video480p, video720p) {
|
|||
return;
|
||||
break;
|
||||
default:
|
||||
console.log('480p is valid');
|
||||
if (currentQuality === '720p' && typeof(video720p) === 'undefined') {
|
||||
ft.log('480p is valid');
|
||||
if (currentQuality === '720p' && typeof (video720p) === 'undefined') {
|
||||
changeQuality(video480p);
|
||||
}
|
||||
break;
|
||||
|
@ -553,7 +560,7 @@ function checkVideoUrls(video480p, video720p) {
|
|||
});
|
||||
}
|
||||
|
||||
if (typeof(video720p) !== 'undefined') {
|
||||
if (typeof (video720p) !== 'undefined') {
|
||||
let get720pUrl = fetch(video720p);
|
||||
get720pUrl.then((status) => {
|
||||
switch (status.status) {
|
||||
|
@ -563,7 +570,7 @@ function checkVideoUrls(video480p, video720p) {
|
|||
$(document).on('click', '#quality720p', (event) => {
|
||||
changeQuality('');
|
||||
});
|
||||
if (typeof(valid480) !== 'undefined') {
|
||||
if (typeof (valid480) !== 'undefined') {
|
||||
changeQuality(video480p, '480p');
|
||||
}
|
||||
break;
|
||||
|
@ -576,7 +583,7 @@ function checkVideoUrls(video480p, video720p) {
|
|||
return;
|
||||
break;
|
||||
default:
|
||||
console.log('720p is valid');
|
||||
ft.log('720p is valid');
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List a YouTube HTTP API resource.
|
||||
*
|
||||
|
@ -12,14 +31,14 @@ function youtubeAPI(resource, params, success) {
|
|||
params.key = apiKey;
|
||||
|
||||
if (useTor) {
|
||||
tor.request('https://www.googleapis.com/youtube/v3/' + resource + '?' + $.param(params), function(err, res, body) {
|
||||
tor.request('https://www.googleapis.com/youtube/v3/' + resource + '?' + $.param(params), function (err, res, body) {
|
||||
if (!err && res.statusCode == 200) {
|
||||
success(JSON.parse(body));
|
||||
} else {
|
||||
showToast('Unable to connect to the Tor network. Check the help page if you\'re having trouble setting up your node.');
|
||||
console.log(err);
|
||||
console.log(res);
|
||||
console.log(body);
|
||||
showToast('Unable to connect to the Tor network. Check the help page if you\'resss having trouble setting up your node.');
|
||||
ft.log('Tor Error: ', err);
|
||||
ft.log('Tor Error (Result): ', res);
|
||||
ft.log('Tor Error (body): ', body);
|
||||
stopLoadingAnimation();
|
||||
}
|
||||
});
|
||||
|
@ -30,9 +49,9 @@ function youtubeAPI(resource, params, success) {
|
|||
success
|
||||
).fail((xhr, textStatus, error) => {
|
||||
showToast('There was an error calling the YouTube API.');
|
||||
console.log(error);
|
||||
console.log(xhr);
|
||||
console.log(textStatus);
|
||||
ft.log('YT API Error: ', error);
|
||||
ft.log('YT API Error - XHR: ', xhr);
|
||||
ft.log('YT API Error - Text Status: ', textStatus);
|
||||
stopLoadingAnimation();
|
||||
});
|
||||
}
|
||||
|
@ -53,16 +72,16 @@ function youtubedlGetInfo(videoId, callback) {
|
|||
let url = 'https://youtube.com/watch?v=' + videoId;
|
||||
let options = ['--all-subs', '--write-subs'];
|
||||
|
||||
ytdl.getInfo(url, options, function(err, info) {
|
||||
ytdl.getInfo(url, options, function (err, info) {
|
||||
if (err) {
|
||||
showToast(err.message);
|
||||
stopLoadingAnimation();
|
||||
console.log(err);
|
||||
console.log(info);
|
||||
ft.log('Error getting video download info: ', err.message);
|
||||
ft.log('Error getting video download info: ', info);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Success');
|
||||
ft.log('Success');
|
||||
callback(info);
|
||||
});
|
||||
}
|
|
@ -1,22 +1,39 @@
|
|||
.channelViewBanner{
|
||||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.channelViewBanner {
|
||||
width: 100%;
|
||||
max-height: 200px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.channelViewImage{
|
||||
.channelViewImage {
|
||||
float: left;
|
||||
width: 100px;
|
||||
border-radius: 200px 200px 200px 200px;
|
||||
-webkit-border-radius: 200px 200px 200px 200px;
|
||||
}
|
||||
|
||||
.channelViewTitle{
|
||||
.channelViewTitle {
|
||||
height: 100px;
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
.channelViewName{
|
||||
.channelViewName {
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
margin-left: 20px;
|
||||
|
@ -24,14 +41,14 @@
|
|||
top: 20px;
|
||||
}
|
||||
|
||||
.channelViewSubs{
|
||||
.channelViewSubs {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.channelSubButton{
|
||||
.channelSubButton {
|
||||
float: right;
|
||||
width: 125px;
|
||||
height: 50px;
|
||||
|
@ -40,6 +57,6 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.channelViewDescription{
|
||||
.channelViewDescription {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
::-webkit-scrollbar {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
|
@ -14,54 +31,218 @@
|
|||
background: #262626;
|
||||
}
|
||||
|
||||
body{background-color: #212121;}
|
||||
input[type=text] {color: #EEEEEE;}
|
||||
.sk-cube-grid .sk-cube {background-color: #f44336;}
|
||||
.searchBar ::-webkit-input-placeholder {color: #E0E0E0;}
|
||||
.topNav{background-color: #262626; -webkit-box-shadow: 0px -4px 20px 0px rgba(0,0,0,0.75);}
|
||||
.logo{color: #f44336;}
|
||||
.searchBar input{border-bottom: 1px solid #ddd;}
|
||||
.searchButton{color: #E0E0E0;}
|
||||
.jumpToInput{border-bottom: 1px solid #E0E0E0;}
|
||||
.message{color: #757575;}
|
||||
.videoDelete{color: white;}
|
||||
.channelViewImage{border: 0px solid white;}
|
||||
.channelViewName{color: #EEEEEE;}
|
||||
.channelViewSubs{color: #BDBDBD;}
|
||||
.channelViewDescription{color: #E0E0E0;}
|
||||
.channelSubButton{color: #E0E0E0; background-color: #f44336;}
|
||||
.videoTitle{color: #EEEEEE;}
|
||||
.channelName{color: #E0E0E0;}
|
||||
.videoDescription{color: #E0E0E0;}
|
||||
.statistics{background-color: #424242; color: #EEEEEE;}
|
||||
.views{color: #E0E0E0;}
|
||||
.details{background-color: #424242; color: #EEEEEE;}
|
||||
.playerSubButton{color: #E0E0E0; background-color: #f44336;}
|
||||
.smallButton{color: #E0E0E0; background-color: #757575;}
|
||||
.recommendDate{color: #E0E0E0;}
|
||||
.settingsButton {color: #BDBDBD; background-color: #424242;}
|
||||
.qualityTypes{color: #E0E0E0; background-color: #757575;}
|
||||
.speedTypes{color: #E0E0E0; background-color: #757575;}
|
||||
.unsaved{color: #E0E0E0;}
|
||||
.double-bounce1, .double-bounce2 {background-color: #f44336;}
|
||||
.videoOptions ul {background-color: #262626; color: white;}
|
||||
.videoOptions li:hover {background-color: #262626;}
|
||||
.videoOptions a {color: white;}
|
||||
body {
|
||||
background-color: #212121;
|
||||
}
|
||||
|
||||
#main{color: #EEEEEE;}
|
||||
#main hr{border-bottom: 1px solid #212121;}
|
||||
#subscriptions img{border: 0px solid white;}
|
||||
#sideNav{background-color: #262626; color: #E0E0E0; -webkit-box-shadow: 4px -2px 51px -6px rgba(0,0,0,0.75);}
|
||||
#sideNav hr{background-color: #f44336;}
|
||||
#sideNav li:hover{background-color: #212121;}
|
||||
#channelIcon{border: 0px solid white;}
|
||||
#channelName{color: #E0E0E0;}
|
||||
#publishDate{color: #E0E0E0;}
|
||||
#description{color: #E0E0E0;}
|
||||
#showComments{background-color: #757575; color: #E0E0E0;}
|
||||
#recommendations{color: #EEEEEE;}
|
||||
#videoListContainer{color: #EEEEEE;}
|
||||
#toast{background-color: #616161; color: white;}
|
||||
#confirmFunction{background-color: #616161; color: white;}
|
||||
#getNextPage{background-color: #616161}
|
||||
#comments{background-color: #424242;}
|
||||
input[type=text] {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
.sk-cube-grid .sk-cube {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.searchBar ::-webkit-input-placeholder {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.topNav {
|
||||
background-color: #262626;
|
||||
-webkit-box-shadow: 0px -4px 20px 0px rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
.logo {
|
||||
color: #f44336;
|
||||
}
|
||||
|
||||
.searchBar input {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.searchButton {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.jumpToInput {
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
}
|
||||
|
||||
.message {
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.videoDelete {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.channelViewImage {
|
||||
border: 0px solid white;
|
||||
}
|
||||
|
||||
.channelViewName {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
.channelViewSubs {
|
||||
color: #BDBDBD;
|
||||
}
|
||||
|
||||
.channelViewDescription {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.channelSubButton {
|
||||
color: #E0E0E0;
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.videoTitle {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
.channelName {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.videoDescription {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.statistics {
|
||||
background-color: #424242;
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
.views {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.details {
|
||||
background-color: #424242;
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
.playerSubButton {
|
||||
color: #E0E0E0;
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.smallButton {
|
||||
color: #E0E0E0;
|
||||
background-color: #757575;
|
||||
}
|
||||
|
||||
.recommendDate {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.settingsButton {
|
||||
color: #BDBDBD;
|
||||
background-color: #424242;
|
||||
}
|
||||
|
||||
.qualityTypes {
|
||||
color: #E0E0E0;
|
||||
background-color: #757575;
|
||||
}
|
||||
|
||||
.speedTypes {
|
||||
color: #E0E0E0;
|
||||
background-color: #757575;
|
||||
}
|
||||
|
||||
.unsaved {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
.double-bounce1,
|
||||
.double-bounce2 {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.videoOptions ul {
|
||||
background-color: #262626;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.videoOptions li:hover {
|
||||
background-color: #262626;
|
||||
}
|
||||
|
||||
.videoOptions a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#main {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
#main hr {
|
||||
border-bottom: 1px solid #212121;
|
||||
}
|
||||
|
||||
#subscriptions img {
|
||||
border: 0px solid white;
|
||||
}
|
||||
|
||||
#sideNav {
|
||||
background-color: #262626;
|
||||
color: #E0E0E0;
|
||||
-webkit-box-shadow: 4px -2px 51px -6px rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
#sideNav hr {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
#sideNav li:hover {
|
||||
background-color: #212121;
|
||||
}
|
||||
|
||||
#channelIcon {
|
||||
border: 0px solid white;
|
||||
}
|
||||
|
||||
#channelName {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
#publishDate {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
#description {
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
#showComments {
|
||||
background-color: #757575;
|
||||
color: #E0E0E0;
|
||||
}
|
||||
|
||||
#recommendations {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
#videoListContainer {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
#toast {
|
||||
background-color: #616161;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#confirmFunction {
|
||||
background-color: #616161;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#getNextPage {
|
||||
background-color: #616161
|
||||
}
|
||||
|
||||
#comments {
|
||||
background-color: #424242;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
::-webkit-scrollbar {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
|
@ -14,43 +31,167 @@
|
|||
background: white;
|
||||
}
|
||||
|
||||
body{background-color: #e0e0e0;}
|
||||
.sk-cube-grid .sk-cube {background-color: #f44336;}
|
||||
.searchBar ::-webkit-input-placeholder {color: #ddd;}
|
||||
.topNav{background-color: #f44336; -webkit-box-shadow: 0px -4px 32px 0px rgba(0, 0, 0, 0.75);}
|
||||
.searchBar input{border-bottom: 1px solid #ddd;}
|
||||
.searchButton{color: black;}
|
||||
.jumpToInput{border-bottom: 1px solid #757575;}
|
||||
.message{color: #757575;}
|
||||
.videoDelete{color: black;}
|
||||
.channelViewImage{border: 0px solid #000000;}
|
||||
.channelViewSubs{color: #757575;}
|
||||
.channelSubButton{color: #616161; background-color: #eeeeee;}
|
||||
.videoTitle{color: #000000;}
|
||||
.channelName{color: #424242;}
|
||||
.videoDescription{color: #424242;}
|
||||
.statistics{background-color: white;}
|
||||
.views{color: #424242;}
|
||||
.details{background-color: white;}
|
||||
.playerSubButton{color: #616161; background-color: #eeeeee;}
|
||||
.smallButton{color: #616161; background-color: #eeeeee;}
|
||||
.recommendDate{color: #616161;}
|
||||
.settingsButton {color: #424242; background-color: #BDBDBD;}
|
||||
.qualityTypes{background-color: #eeeeee;}
|
||||
.speedTypes{background-color: #eeeeee;}
|
||||
.unsaved{color: #616161;}
|
||||
.double-bounce1, .double-bounce2 {background-color: #f44336;}
|
||||
.videoOptions ul {background-color: #f5f5f5;}
|
||||
.videoOptions li:hover {background-color: #e0e0e0;}
|
||||
.videoOptions a {color: black;}
|
||||
body {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
#subscriptions img{border: 0px solid #000000;}
|
||||
#sideNav{background-color: white; -webkit-box-shadow: 4px -2px 51px -6px rgba(0,0,0,0.75);}
|
||||
#sideNav hr{background-color: #f44336;}
|
||||
#sideNav li:hover{background-color: #e0e0e0;}
|
||||
#channelIcon{border: 0px solid #000000;}
|
||||
#showComments{background-color: #eeeeee;}
|
||||
#toast{background-color: #212121; color: #f5f5f5;;}
|
||||
#confirmFunction{background-color: #f5f5f5;}
|
||||
#getNextPage{background-color: #f5f5f5;}
|
||||
#comments{background: #eee;}
|
||||
.sk-cube-grid .sk-cube {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.searchBar ::-webkit-input-placeholder {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.topNav {
|
||||
background-color: #f44336;
|
||||
-webkit-box-shadow: 0px -4px 32px 0px rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
.searchBar input {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.searchButton {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.jumpToInput {
|
||||
border-bottom: 1px solid #757575;
|
||||
}
|
||||
|
||||
.message {
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.videoDelete {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.channelViewImage {
|
||||
border: 0px solid #000000;
|
||||
}
|
||||
|
||||
.channelViewSubs {
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.channelSubButton {
|
||||
color: #616161;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.videoTitle {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.channelName {
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
.videoDescription {
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
.statistics {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.views {
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
.details {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.playerSubButton {
|
||||
color: #616161;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.smallButton {
|
||||
color: #616161;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.recommendDate {
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.settingsButton {
|
||||
color: #424242;
|
||||
background-color: #BDBDBD;
|
||||
}
|
||||
|
||||
.qualityTypes {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.speedTypes {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.unsaved {
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.double-bounce1,
|
||||
.double-bounce2 {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
.videoOptions ul {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.videoOptions li:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.videoOptions a {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#subscriptions img {
|
||||
border: 0px solid #000000;
|
||||
}
|
||||
|
||||
#sideNav {
|
||||
background-color: white;
|
||||
-webkit-box-shadow: 4px -2px 51px -6px rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
#sideNav hr {
|
||||
background-color: #f44336;
|
||||
}
|
||||
|
||||
#sideNav li:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
#channelIcon {
|
||||
border: 0px solid #000000;
|
||||
}
|
||||
|
||||
#showComments {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
#toast {
|
||||
background-color: #212121;
|
||||
color: #f5f5f5;
|
||||
;
|
||||
}
|
||||
|
||||
#confirmFunction {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
#getNextPage {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
#comments {
|
||||
background: #eee;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,26 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Thanks to @tobiasahlin for the loading animation.
|
||||
* Find it here: http://tobiasahlin.com/spinkit/
|
||||
* Twitter: https://twitter.com/tobiasahlin
|
||||
*/
|
||||
|
||||
.spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
@ -11,7 +29,8 @@
|
|||
margin: 100px auto;
|
||||
}
|
||||
|
||||
.double-bounce1, .double-bounce2 {
|
||||
.double-bounce1,
|
||||
.double-bounce2 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
|
@ -30,15 +49,22 @@
|
|||
}
|
||||
|
||||
@-webkit-keyframes sk-bounce {
|
||||
0%, 100% { -webkit-transform: scale(0.0) }
|
||||
50% { -webkit-transform: scale(1.0) }
|
||||
0%,
|
||||
100% {
|
||||
-webkit-transform: scale(0.0)
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-bounce {
|
||||
0%, 100% {
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(0.0);
|
||||
-webkit-transform: scale(0.0);
|
||||
} 50% {
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.0);
|
||||
-webkit-transform: scale(1.0);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
src: url(Roboto-Regular.ttf);
|
||||
|
@ -221,7 +238,7 @@ a {
|
|||
line-height: 10px;
|
||||
}
|
||||
|
||||
#toast{
|
||||
#toast {
|
||||
min-width: 400px;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
|
@ -240,7 +257,7 @@ a {
|
|||
-o-transition: opacity 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.closeToast{
|
||||
.closeToast {
|
||||
font-size: 15px;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
|
@ -248,7 +265,7 @@ a {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#confirmFunction{
|
||||
#confirmFunction {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 30%;
|
||||
|
@ -258,31 +275,31 @@ a {
|
|||
line-height: 65px;
|
||||
visibility: hidden;
|
||||
z-index: 1;
|
||||
-webkit-box-shadow: 5px 5px 15px -5px rgba(0,0,0,0.75);
|
||||
-moz-box-shadow: 5px 5px 15px -5px rgba(0,0,0,0.75);
|
||||
box-shadow: 5px 5px 15px -5px rgba(0,0,0,0.75);
|
||||
-webkit-box-shadow: 5px 5px 15px -5px rgba(0, 0, 0, 0.75);
|
||||
-moz-box-shadow: 5px 5px 15px -5px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 5px 5px 15px -5px rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
#confirmMessage{
|
||||
#confirmMessage {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.confirmButton{
|
||||
.confirmButton {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#confirmYes{
|
||||
#confirmYes {
|
||||
right: 90px;
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
#confirmNo{
|
||||
#confirmNo {
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
#getNextPage{
|
||||
#getNextPage {
|
||||
width: 100%;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
|
@ -290,13 +307,15 @@ a {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#comments{
|
||||
display:none;
|
||||
padding:1em;
|
||||
#comments {
|
||||
display: none;
|
||||
padding: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.saved{color: #FFEB3B;}
|
||||
.saved {
|
||||
color: #FFEB3B;
|
||||
}
|
||||
|
||||
/* Thanks to Guus Lieben for the Material Design Switch */
|
||||
|
||||
|
@ -315,7 +334,8 @@ a {
|
|||
padding: 16px 0 16px 44px;
|
||||
}
|
||||
|
||||
.switch-label:before, .switch-label:after {
|
||||
.switch-label:before,
|
||||
.switch-label:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 41.25vw;
|
||||
|
@ -11,7 +28,7 @@ iframe {
|
|||
.video {
|
||||
width: 95%;
|
||||
max-width: 1000px;
|
||||
height: 145px;
|
||||
height: auto;
|
||||
padding: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -23,7 +40,7 @@ iframe {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.videoThumbnail img{
|
||||
.videoThumbnail img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -36,7 +53,7 @@ iframe {
|
|||
left: 60px;
|
||||
}
|
||||
|
||||
.channelThumbnail img{
|
||||
.channelThumbnail img {
|
||||
width: 100%;
|
||||
border-radius: 200px 200px 200px 200px;
|
||||
-webkit-border-radius: 200px 200px 200px 200px;
|
||||
|
@ -54,6 +71,7 @@ iframe {
|
|||
}
|
||||
|
||||
.videoOptions ul {
|
||||
|
||||
width: 90px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
@ -61,8 +79,9 @@ iframe {
|
|||
bottom: 10px;
|
||||
list-style-type: none;
|
||||
display: none;
|
||||
-webkit-box-shadow: 4px 4px 33px -7px rgba(0,0,0,0.75);
|
||||
-webkit-box-shadow: 4px 4px 33px -7px rgba(0, 0, 0, 0.75);
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.videoOptions li {
|
||||
|
@ -108,7 +127,6 @@ iframe {
|
|||
}
|
||||
|
||||
.videoDuration {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
position: relative;
|
||||
bottom: 36px;
|
||||
|
@ -316,7 +334,7 @@ iframe {
|
|||
float: left;
|
||||
}
|
||||
|
||||
.recommendThumbnail img{
|
||||
.recommendThumbnail img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
.videoListContainer{width: 100%;}
|
||||
.videoListContainer {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.videoListContainer hr{
|
||||
.videoListContainer hr {
|
||||
width: 95%;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
|
|
|
@ -1,11 +1,28 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class='center'>
|
||||
<img src='icons/logoColor.png' width='500px;'/>
|
||||
<h1>{{versionNumber}} Beta</h1>
|
||||
<h3><i class='fas fa-envelope'></i> FreeTubeApp@protonmail.com</h3>
|
||||
<h2>This software is FOSS and released under the <a href='https://www.gnu.org/licenses/quick-guide-gplv3.html'>GNU Public License v3+</a>.</h2>
|
||||
<p>Found a bug? Want to suggest a feature? Want to help out? Check out our <a href='https://github.com/FreeTubeApp/FreeTube'>GitHub</a> page. Pull requests are welcome.</p>
|
||||
<p>Thank you very much to the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Credits'>People and Projects</a> that make FreeTube possible!</p>
|
||||
<p>Want to chat? Join our <a href='https://riot.im/app/#/room/#freetube:matrix.org'>Riot / Matrix Server</a>. Please check the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules'>rules</a> before joining.</p>
|
||||
<p>Looking for help? Check out our <a href='https://github.com/FreeTubeApp/FreeTube/wiki'>Wiki</a> page.</p>
|
||||
<p>Check out our <a href='https://addons.mozilla.org/en-US/firefox/addon/freetube-redirect/'>Firefox</a> extension!</p>
|
||||
<img src='icons/logoColor.png' width='500px;' />
|
||||
<h1>{{versionNumber}} Beta</h1>
|
||||
<h3><i class='fas fa-envelope'></i> FreeTubeApp@protonmail.com</h3>
|
||||
<h2>This software is FOSS and released under the <a href='https://www.gnu.org/licenses/quick-guide-gplv3.html'>GNU Public License v3+</a>.</h2>
|
||||
<p>Found a bug? Want to suggest a feature? Want to help out? Check out our <a href='https://github.com/FreeTubeApp/FreeTube'>GitHub</a> page. Pull requests are welcome.</p>
|
||||
<p>Thank you very much to the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Credits'>People and Projects</a> that make FreeTube possible!</p>
|
||||
<p>Want to chat? Join our <a href='https://riot.im/app/#/room/#freetube:matrix.org'>Riot / Matrix Server</a>. Please check the <a href='https://github.com/FreeTubeApp/FreeTube/wiki/Matrix-Server-Info-&-Rules'>rules</a> before joining.</p>
|
||||
<p>Looking for help? Check out our <a href='https://github.com/FreeTubeApp/FreeTube/wiki'>Wiki</a> page.</p>
|
||||
<p>Check out our <a href='https://addons.mozilla.org/en-US/firefox/addon/freetube-redirect/'>Firefox</a> extension!</p>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class='video'>
|
||||
<div class='channelThumbnail'>
|
||||
<img onclick='goToChannel("{{channelId}}")' src={{channelThumbnail}} />
|
||||
<img onclick='goToChannel("{{channelId}}")' src= {{channelThumbnail}} />
|
||||
</div>
|
||||
<p onclick='goToChannel("{{channelId}}")' class='videoTitle'>{{channelName}}</p>
|
||||
<p onclick='goToChannel("{{channelId}}")' class='channelName'>{{subscriberCount}} subscribers - {{videoCount}} videos</p>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<img class='channelViewBanner' src='{{channelBanner}}' />
|
||||
<br />
|
||||
<div class='channelViewTitle'>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
{{#comments}}
|
||||
<div class="user-comment">
|
||||
<div onclick='goToChannel("{{authorChannelId.value}}")' style="float:left;margin-right: 1em; width:48px">
|
||||
|
|
|
@ -1,15 +1,35 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<title>Freetube Mini-Player</title>
|
||||
<style>
|
||||
body{
|
||||
body {
|
||||
background-color: #424242;
|
||||
}
|
||||
.videoPlayer{
|
||||
|
||||
.videoPlayer {
|
||||
width: 100%;
|
||||
}
|
||||
iframe{
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 54.9vw;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="../js/events.js"></script>
|
||||
<script>
|
||||
|
@ -22,25 +42,25 @@ $('.videoPlayer').ready(() => {
|
|||
});
|
||||
|
||||
/**
|
||||
* Hide the mouse cursor after ~3 seconds. Used to hide the video when the user
|
||||
* hovers the mouse over the video player.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function hideMouseTimeout(){
|
||||
* Hide the mouse cursor after ~3 seconds. Used to hide the video when the user
|
||||
* hovers the mouse over the video player.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function hideMouseTimeout() {
|
||||
$('.videoPlayer')[0].style.cursor = 'default';
|
||||
clearTimeout(mouseTimeout);
|
||||
mouseTimeout = window.setTimeout(function(){
|
||||
mouseTimeout = window.setTimeout(function() {
|
||||
$('.videoPlayer')[0].style.cursor = 'none';
|
||||
}, 3150);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the timeout for the mouse cursor as a fallback.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeMouseTimeout(){
|
||||
* Remove the timeout for the mouse cursor as a fallback.
|
||||
*
|
||||
* @return {Void}
|
||||
*/
|
||||
function removeMouseTimeout() {
|
||||
$('.videoPlayer')[0].style.cursor = 'default';
|
||||
clearTimeout(mouseTimeout);
|
||||
}
|
||||
|
@ -53,5 +73,6 @@ let playPauseVideo = function(event) {
|
|||
$(document).on('click', '.videoPlayer', playPauseVideo);
|
||||
$(document).on('mouseover', '.videoPlayer', hideMouseTimeout);
|
||||
$(document).on('mouseleave', '.videoPlayer', removeMouseTimeout);
|
||||
|
||||
</script>
|
||||
{{{videoHtml}}}
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<video class="videoPlayer" type="application/x-mpegURL" onmousemove="hideMouseTimeout()" onmouseleave="removeMouseTimeout()" controls="" src="{{defaultUrl}}" poster="{{videoThumbnail}}" autoplay>
|
||||
{{{subtitleHtml}}}
|
||||
{{{subtitleHtml}}}
|
||||
</video>
|
||||
<div class='statistics'>
|
||||
<div class='smallButton' onclick="openMiniPlayer('{{videoThumbnail}}')">
|
||||
|
@ -41,12 +58,12 @@
|
|||
OPEN IN YOUTUBE
|
||||
</div>
|
||||
</a>
|
||||
<div class='smallButton' onclick='copyLink("hooktube", "{{videoId}}")'>
|
||||
COPY HOOKTUBE LINK
|
||||
<div class='smallButton' onclick='copyLink("invidious", "{{videoId}}")'>
|
||||
COPY INVIDIOUS LINK
|
||||
</div>
|
||||
<a href='https://hooktube.com/watch?v={{videoId}}'>
|
||||
<a href='https://invidio.us/watch?v={{videoId}}'>
|
||||
<div class='smallButton'>
|
||||
OPEN IN HOOKTUBE
|
||||
OPEN IN INVIDIOUS
|
||||
</div>
|
||||
</a>
|
||||
<br />
|
||||
|
@ -65,7 +82,8 @@
|
|||
<p id='channelName' onclick='goToChannel("{{channelId}}")'>{{channelName}}</p>
|
||||
<p id='publishDate'>Published on {{publishedDate}}</p>
|
||||
<div id='subscribeButton' class='playerSubButton' onclick='toggleSubscription("{{channelId}}")'>{{isSubscribed}}</div>
|
||||
<br /><br />
|
||||
<br />
|
||||
<br />
|
||||
<div id='description'>
|
||||
{{{description}}}
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
|
@ -42,10 +59,11 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<title>Freetube Player</title>
|
||||
<style>
|
||||
#main{
|
||||
#main {
|
||||
width: 100%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
@ -58,10 +76,11 @@
|
|||
margin: 0px auto;
|
||||
}
|
||||
|
||||
#loading{
|
||||
#loading {
|
||||
width: 100%;
|
||||
height: 0%;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -87,8 +106,7 @@
|
|||
<input id='search' class="search" type="text" placeholder="Search / Go to URL">
|
||||
<i onclick='parseSearchText()' class="fas fa-search searchButton" style='margin-right: -10px; cursor: pointer'></i>
|
||||
</div>
|
||||
<img src='icons/iconBlack.png' id='menuIcon'/>
|
||||
|
||||
<img src='icons/textBlack.png' id='menuText'/>
|
||||
<img src='icons/iconBlack.png' id='menuIcon' />
|
||||
<img src='icons/textBlack.png' id='menuText' />
|
||||
</div>
|
||||
<div id='main'>
|
||||
<div id='main'>
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class='video'>
|
||||
<div class='videoThumbnail'>
|
||||
<img onclick='console.log("Not Implemented")' src={{playlistThumbnail}} />
|
||||
<img onclick='console.log("Not Implemented")' src= {{playlistThumbnail}} />
|
||||
</div>
|
||||
<p onclick='goToChannel("{{channelId}}")' class='videoTitle'>{{playlistTitle}}</p>
|
||||
<p onclick='goToChannel("{{channelId}}")' class='channelName'>{{channelName}} - {{publishedDate}}</p>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class='recommendVideo' onclick='playVideo("{{videoId}}")'>
|
||||
<div class='recommendThumbnail'>
|
||||
<img src='{{videoThumbnail}}'></img>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<h1 class="center">Settings</h1>
|
||||
<div class='center'>
|
||||
<input type='text' name='api-key' id='api-key' class='settingsInput' value='{{key}}' placeholder='API Key' />
|
||||
|
@ -17,7 +34,8 @@
|
|||
EXPORT SUBSCRIPTIONS
|
||||
</div>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br />
|
||||
<br />
|
||||
<div class='center'>
|
||||
<div onclick='confirmFunction("Are you sure you want to delete your history?", clearFile, "history")' class='settingsButton'>
|
||||
CLEAR HISTORY
|
||||
|
@ -29,7 +47,8 @@
|
|||
CLEAR SUBSCRIPTIONS
|
||||
</div>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br />
|
||||
<br />
|
||||
<div onclick='updateSettings()' class='center settingsSubmit'>
|
||||
SAVE SETTINGS
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<li onclick='goToChannel("{{channelId}}")'>
|
||||
<img src='{{channelIcon}}' />
|
||||
{{channelName}}
|
||||
<img src='{{channelIcon}}' /> {{channelName}}
|
||||
<i class='fas fa-times' onclick='toggleSubscription("{{channelId}}")'></i>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<video class="videoPlayer" onmousemove="hideMouseTimeout()" onmouseleave="removeMouseTimeout()" controls="" poster="{{videoThumbnail}}" autoplay>
|
||||
<source src="{{videoUrl}}" type="video/mp4">
|
||||
{{subtitleElements}}
|
||||
<source src="{{videoUrl}}" type="video/mp4"> {{subtitleElements}}
|
||||
</video>
|
||||
|
|
|
@ -1,16 +1,37 @@
|
|||
<!--
|
||||
This file is part of FreeTube.
|
||||
|
||||
FreeTube is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeTube is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class='video'>
|
||||
<div class='videoOptions'>
|
||||
<i class="fas fa-ellipsis-v" onclick='showVideoOptions(this)'></i>
|
||||
<ul>
|
||||
<li onclick='playVideo("{{videoId}}", "", true); showVideoOptions(this.parentNode.previousSibling);'>Open (New Window)</li>
|
||||
<li onclick='addSavedVideo("{{videoId}}"); showVideoOptions(this.parentNode.previousSibling);'>Save Video</li>
|
||||
<a href='https://youtube.com/watch?v={{videoId}}' onclick='showVideoOptions(this.parentNode.previousSibling);'><li>Open in YouTube</li></a>
|
||||
<a href='https://hooktube.com/watch?v={{videoId}}' onclick='showVideoOptions(this.parentNode.previousSibling);'><li>Open in HookTube</li></a>
|
||||
<li onclick='addSavedVideo("{{videoId}}"); showVideoOptions(this.parentNode.previousSibling);'>Favorite Video</li>
|
||||
<a href='https://youtube.com/watch?v={{videoId}}' onclick='showVideoOptions(this.parentNode.previousSibling);'>
|
||||
<li>Open in YouTube</li>
|
||||
</a>
|
||||
<a href='https://invidio.us/watch?v={{videoId}}' onclick='showVideoOptions(this.parentNode.previousSibling);'>
|
||||
<li>Open in Invidious</li>
|
||||
</a>
|
||||
{{{deleteHtml}}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class='videoThumbnail'>
|
||||
<img onclick='playVideo("{{videoId}}", "{{videoThumbnail}}")' src={{videoThumbnail}} />
|
||||
<img onclick='playVideo("{{videoId}}", "{{videoThumbnail}}")' src= {{videoThumbnail}} />
|
||||
<p onclick='playVideo("{{videoId}}")' class='videoDuration'>{{videoDuration}}</p>
|
||||
</div>
|
||||
<p onclick='playVideo("{{videoId}}")' class='videoTitle'>{{videoTitle}}</p>
|
||||
|
|
Loading…
Reference in New Issue