Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Invidition
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Booteille
Invidition
Commits
52caef72
Verified
Commit
52caef72
authored
Oct 09, 2019
by
Booteille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix subtitles
parent
4d015980
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
7 deletions
+20
-7
CHANGELOG.md
CHANGELOG.md
+4
-0
extension/manifest.json
extension/manifest.json
+1
-1
src/config/config.ts
src/config/config.ts
+1
-1
src/lib/API/invidious.ts
src/lib/API/invidious.ts
+2
-1
src/lib/backward_compatibility.ts
src/lib/backward_compatibility.ts
+10
-2
src/lib/form.ts
src/lib/form.ts
+2
-2
No files found.
CHANGELOG.md
View file @
52caef72
...
...
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
Fix some typos.
-
Disabling a service in the popup menu now disable its fieldset too.
### Fixed
-
Captions where not working due to the use of the wrong url parameter.
-
`captions`
url parameter renamed to
`subtitles`
## [0.12.0] - 2019-10-08
### Added
...
...
extension/manifest.json
View file @
52caef72
{
"manifest_version"
:
2
,
"name"
:
"__MSG_extName__"
,
"version"
:
"0.1
2
.0"
,
"version"
:
"0.1
3
.0"
,
"description"
:
"__MSG_extShortDesc__"
,
"homepage_url"
:
"https://gitlab.com/Booteille/Invidition"
,
"default_locale"
:
"en"
,
...
...
src/config/config.ts
View file @
52caef72
...
...
@@ -45,7 +45,6 @@ export const config = {
},
instanceSettings
:
{
autoplay
:
false
,
captions
:
"
,,
"
,
continue
:
false
,
dark_mode
:
true
,
hl
:
""
,
...
...
@@ -56,6 +55,7 @@ export const config = {
player_style
:
"
youtube
"
,
quality
:
"
dash
"
,
region
:
""
,
subtitles
:
"
,,
"
,
thin_mode
:
false
,
},
},
...
...
src/lib/API/invidious.ts
View file @
52caef72
...
...
@@ -45,8 +45,9 @@ export const applySearchParams = async (url: URL) => {
// Workaround for old versions not handling true as parameter
v
=
v
?
1
:
0
;
break
;
case
"
caption
s
"
:
case
"
subtitle
s
"
:
cv
=
v
.
split
(
"
,
"
);
ck
=
"
captions
"
;
v
=
cv
;
break
;
case
"
dark_mode
"
:
...
...
src/lib/backward_compatibility.ts
View file @
52caef72
...
...
@@ -7,7 +7,15 @@ import * as SettingManager from "./settings";
export
const
updateOldConfig
=
async
(
details
)
=>
{
try
{
if
(
details
.
reason
===
"
update
"
)
{
if
(
details
.
previousVersion
<
"
0.11.0
"
)
{
if
(
details
.
previousVersion
>=
"
0.11.0
"
&&
details
.
previousVersion
<
"
0.13.0
"
)
{
info
(
"
Updating configuration from previous version.
"
);
const
settings
=
await
SettingManager
.
load
();
config
.
invidious
.
instanceSettings
.
subtitles
=
settings
.
invidious
.
instanceSettings
.
captions
;
await
SettingManager
.
save
(
config
);
}
if
(
details
.
previousVersion
<
"
0.11.0
"
)
{
info
(
"
Updating configuration from previous version.
"
);
const
settings
=
await
browser
.
storage
.
sync
.
get
();
...
...
@@ -18,7 +26,7 @@ export const updateOldConfig = async (details) => {
config
.
invidious
.
instanceSettings
.
continue
=
settings
.
autoplay_next
;
config
.
invidious
.
instanceSettings
.
hl
=
settings
.
hl
;
config
.
invidious
.
instanceSettings
.
local
=
settings
.
local
===
"
true
"
;
config
.
invidious
.
instanceSettings
.
caption
s
=
settings
.
subtitles
;
config
.
invidious
.
instanceSettings
.
subtitle
s
=
settings
.
subtitles
;
await
SettingManager
.
clear
();
// Remove old settings before saving new
await
SettingManager
.
save
(
config
);
...
...
src/lib/form.ts
View file @
52caef72
...
...
@@ -135,7 +135,7 @@ export const getSettingsFromDOM = async () => {
break
;
case
"
SELECT
"
:
if
(
e
.
className
===
"
defaultCaptions
"
)
{
settings
[
service
][
category
].
caption
s
=
captionsToQuery
();
settings
[
service
][
category
].
subtitle
s
=
captionsToQuery
();
}
else
{
settings
[
service
][
category
][
optionName
]
=
(
e
as
HTMLSelectElement
).
value
;
}
...
...
@@ -324,7 +324,7 @@ export const updateDOM = async () => {
_
.
forEach
(
options
,
(
category
,
categoryName
)
=>
{
// Iterate over categories
_
.
forEach
(
category
,
(
value
,
name
)
=>
{
// Iterate over settings
if
(
name
!==
"
caption
s
"
)
{
if
(
name
!==
"
subtitle
s
"
)
{
const
e
:
HTMLElement
=
document
.
getElementById
(
`
${
service
}
-
${
categoryName
}
-
${
name
}
`
)
as
HTMLElement
;
if
(
e
!==
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment