Skip to content

Commit c4033f0

Browse files
authored
Merge pull request #305 from richardfrost/cleanup
Code Cleanup
2 parents 3085be7 + d3c9d28 commit c4033f0

File tree

6 files changed

+50
-51
lines changed

6 files changed

+50
-51
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ text eol=lf
99
/src/static/w3-color-flat.css linguist-vendored
1010
/store/* linguist-vendored
1111
/test/* linguist-documentation
12-

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
/test/coverage/*
1515

1616
# Built shared libs
17-
/src/script/lib/*.js
17+
/src/script/lib/*.js

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ before_script:
99
- npm run package
1010

1111
script:
12-
- npm run test:all
12+
- npm run test:all

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
theme: jekyll-theme-minimal
1+
theme: jekyll-theme-minimal

src/script/lib/globals.d.ts

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
interface AudioRule {
2-
_displayElement?: HTMLElement; // Element to display/hide
3-
_dynamic?: boolean; // [Dynamic] Set to true on a dynamic rule
4-
apfCaptions?: boolean; // [Cue] Display an HTML version of the caption/subtitle text: Requires videoCueHideCues = true
5-
apfCaptionsSelector?: string; // [Cue] Selector for container that will hold the custom HTML captions
6-
checkInterval?: number; // [Watcher] Set a custom watch interval (in ms, Default: 20)
7-
className?: string; // [Element] node.className.includes()
8-
containsSelector?: string; // [Element] node.querySelector() [Not commonly used]
9-
convertBreaks?: boolean; // [Element,ElementChild] Convert <br> to '\n'
10-
dataPropPresent?: string; // [Element] node.dataset.hasOwnProperty()
11-
disabled?: boolean; // [All] Set automatically based on iframe status or missing a required property
12-
displayHide?: string; // [Element,ElementChild,Watcher] Display style for hiding captions (Default: 'none')
13-
displaySelector?: string; // [Element,ElementChild,Watcher] Alternate selector to hide/show captions
14-
displayShow?: string; // [Element,ElementChild,Watcher] Display style for showing captions (Default: '')
15-
displayVisibility?: boolean; // [Watcher*] Use visibility to show/hide caption container
16-
dynamicClasslist?: string; // [Dynamic] Set when a dynamicTextKey is found
17-
dynamicTargetMode?: string; // [Dynamic] Target mode for dynamic rule
18-
dynamicTextKey?: string; // [Dynamic] Key used to identify a dynamic caption node
19-
externalSub?: boolean; // [Cue] [BETA]: Convert external captions/subtitles obtained from remote source to VTTCues
20-
externalSubFormatKey?: string; // [Cue] [BETA]: Key name for caption/subtitle format (Default: 'format')
21-
externalSubTrackLabel?: string; // [Cue] [BETA]: Label used for processed TextTrack
2+
_displayElement?: HTMLElement; // Element to display/hide
3+
_dynamic?: boolean; // [Dynamic] Set to true on a dynamic rule
4+
apfCaptions?: boolean; // [Cue] Display an HTML version of the caption/subtitle text: Requires videoCueHideCues = true
5+
apfCaptionsSelector?: string; // [Cue] Selector for container that will hold the custom HTML captions
6+
checkInterval?: number; // [Watcher] Set a custom watch interval (in ms, Default: 20)
7+
className?: string; // [Element] node.className.includes()
8+
containsSelector?: string; // [Element] node.querySelector() [Not commonly used]
9+
convertBreaks?: boolean; // [Element,ElementChild] Convert <br> to '\n'
10+
dataPropPresent?: string; // [Element] node.dataset.hasOwnProperty()
11+
disabled?: boolean; // [All] Set automatically based on iframe status or missing a required property
12+
displayHide?: string; // [Element,ElementChild,Watcher] Display style for hiding captions (Default: 'none')
13+
displaySelector?: string; // [Element,ElementChild,Watcher] Alternate selector to hide/show captions
14+
displayShow?: string; // [Element,ElementChild,Watcher] Display style for showing captions (Default: '')
15+
displayVisibility?: boolean; // [Watcher*] Use visibility to show/hide caption container
16+
dynamicClasslist?: string; // [Dynamic] Set when a dynamicTextKey is found
17+
dynamicTargetMode?: string; // [Dynamic] Target mode for dynamic rule
18+
dynamicTextKey?: string; // [Dynamic] Key used to identify a dynamic caption node
19+
externalSub?: boolean; // [Cue] [BETA]: Convert external captions/subtitles obtained from remote source to VTTCues
20+
externalSubFormatKey?: string; // [Cue] [BETA]: Key name for caption/subtitle format (Default: 'format')
21+
externalSubTrackLabel?: string; // [Cue] [BETA]: Label used for processed TextTrack
2222
externalSubTrackMode?: TextTrackMode; // [Cue] [BETA]: TextTrack mode for new TextTrack
23-
externalSubURLKey?: string; // [Cue] [BETA]: Key name for caption/subtitle URL (Default: 'url')
24-
externalSubVar?: string; // [Cue] [BETA]: Global variable to find available caption/subtitle data
25-
filterSubtitles?: boolean; // [All] Filter subtitle text (Default: true)
26-
hasChildrenElements?: boolean; // [Element] node.childElementCount > 0 [Not commonly used]
27-
iframe?: boolean | undefined; // [All] Pages to run on (true: only iframes, false: no iframes, undefined: all)
28-
ignoreMutations?: boolean; // [Element,ElementChild,Text,Watcher] Ignore mutations when filtering captions/subtitles
29-
mode: string; // [All*] 'cue', 'dynamic', 'element', 'elementChild', 'text', 'watcher'
30-
muteMethod?: number; // [All] Override global muteMthod (0: tab, 1: video)
31-
note?: string; // [All] Note about the rule
32-
parentSelector?: string; // [ElementChild?,Text,Watcher] parent.contains(node)
33-
parentSelectorAll?: string; // [ElementChild?] Check if any parents contain the node: parent.contains(node)
34-
preserveWhiteSpace?: boolean; // [Element,ElementChild] Set whiteSpace = 'pre' on subtitle elements
35-
removeSubtitleSpacing?: boolean; // [Element] Remove subtitle padding/margin when hiding
36-
rootNode?: boolean; // [Element,ElementChild] Use getRootNode() or assume document (Default: false)
37-
showSubtitles?: number; // [All] Override global showSubtitles (0: all, 1: filtered, 2: unfiltered, 3: none)
38-
simpleUnmute?: boolean; // [Element,ElementChild,Text+,Watcher+] Simplify requirements for unmuting
39-
subtitleSelector?: string; // [Element,ElementChild,Watcher] *Used for Filtering*: node.querySelector()
40-
tagName?: string; // [Element*,ElementChild*] node.nodeName
41-
unmuteDelay?: number; // [Element,ElementChild,Watcher] Positive number (in ms) to delay unmuting
42-
videoCueHideCues?: boolean; // [Cue] Remove/hide cues instead of setting textTrack.mode = 'hidden'
43-
videoCueKind?: string; // [Cue] Kind of video TextTrack ('captions', 'subtitles', etc.)
44-
videoCueLabel?: string; // [Cue] Label for video TextTrack
45-
videoCueLanguage?: string; // [Cue] Language for video TextTrack
46-
videoCueRequireShowing?: boolean; // [Cue] Override global setting for muteCueRequireShowing
47-
videoCueSync?: number; // [Cue] Adjust subtitle sync +/- (in seconds)
48-
videoSelector?: string; // [Cue,Watcher] Selector for video, also used for volume muteMethod (Default: 'video')
23+
externalSubURLKey?: string; // [Cue] [BETA]: Key name for caption/subtitle URL (Default: 'url')
24+
externalSubVar?: string; // [Cue] [BETA]: Global variable to find available caption/subtitle data
25+
filterSubtitles?: boolean; // [All] Filter subtitle text (Default: true)
26+
hasChildrenElements?: boolean; // [Element] node.childElementCount > 0 [Not commonly used]
27+
iframe?: boolean | undefined; // [All] Pages to run on (true: only iframes, false: no iframes, undefined: all)
28+
ignoreMutations?: boolean; // [Element,ElementChild,Text,Watcher] Ignore mutations when filtering captions/subtitles
29+
mode: string; // [All*] 'cue', 'dynamic', 'element', 'elementChild', 'text', 'watcher'
30+
muteMethod?: number; // [All] Override global muteMthod (0: tab, 1: video)
31+
note?: string; // [All] Note about the rule
32+
parentSelector?: string; // [ElementChild?,Text,Watcher] parent.contains(node)
33+
parentSelectorAll?: string; // [ElementChild?] Check if any parents contain the node: parent.contains(node)
34+
preserveWhiteSpace?: boolean; // [Element,ElementChild] Set whiteSpace = 'pre' on subtitle elements
35+
removeSubtitleSpacing?: boolean; // [Element] Remove subtitle padding/margin when hiding
36+
rootNode?: boolean; // [Element,ElementChild] Use getRootNode() or assume document (Default: false)
37+
showSubtitles?: number; // [All] Override global showSubtitles (0: all, 1: filtered, 2: unfiltered, 3: none)
38+
simpleUnmute?: boolean; // [Element,ElementChild,Text+,Watcher+] Simplify requirements for unmuting
39+
subtitleSelector?: string; // [Element,ElementChild,Watcher] *Used for Filtering*: node.querySelector()
40+
tagName?: string; // [Element*,ElementChild*] node.nodeName
41+
unmuteDelay?: number; // [Element,ElementChild,Watcher] Positive number (in ms) to delay unmuting
42+
videoCueHideCues?: boolean; // [Cue] Remove/hide cues instead of setting textTrack.mode = 'hidden'
43+
videoCueKind?: string; // [Cue] Kind of video TextTrack ('captions', 'subtitles', etc.)
44+
videoCueLabel?: string; // [Cue] Label for video TextTrack
45+
videoCueLanguage?: string; // [Cue] Language for video TextTrack
46+
videoCueRequireShowing?: boolean; // [Cue] Override global setting for muteCueRequireShowing
47+
videoCueSync?: number; // [Cue] Adjust subtitle sync +/- (in seconds)
48+
videoSelector?: string; // [Cue,Watcher] Selector for video, also used for volume muteMethod (Default: 'video')
4949
}
5050

5151
interface BackgroundData {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"include": [
1010
"./src/script/**/*.ts"
1111
]
12-
}
12+
}

0 commit comments

Comments
 (0)