Skip to content

Commit 7e4690e

Browse files
committed
Fix typos
1 parent df599c0 commit 7e4690e

File tree

11 files changed

+35
-35
lines changed

11 files changed

+35
-35
lines changed

assets/js/player.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if (location.pathname.startsWith('/embed/')) {
8686
});
8787
}
8888

89-
// Detect mobile users and initalize mobileUi for better UX
89+
// Detect mobile users and initialize mobileUi for better UX
9090
// Detection code taken from https://stackoverflow.com/a/20293441
9191

9292
function isMobile() {
@@ -119,7 +119,7 @@ if (isMobile()) {
119119
operations_bar_element.className += " mobile-operations-bar"
120120
player.addChild(operations_bar)
121121

122-
// Playback menu doesn't work when its initalized outside of the primary control bar
122+
// Playback menu doesn't work when it's initialized outside of the primary control bar
123123
playback_element = document.getElementsByClassName("vjs-playback-rate")[0]
124124
operations_bar_element.append(playback_element)
125125

@@ -138,7 +138,7 @@ if (isMobile()) {
138138
player.on('error', function (event) {
139139
if (player.error().code === 2 || player.error().code === 4) {
140140
setTimeout(function (event) {
141-
console.log('An error occured in the player, reloading...');
141+
console.log('An error occurred in the player, reloading...');
142142

143143
var currentTime = player.currentTime();
144144
var playbackRate = player.playbackRate();

assets/js/themes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function update_mode (mode) {
7777
// If preference for dark mode indicated
7878
set_mode(true);
7979
}
80-
else if (mode === 'false' /* for backwards compaibility */ || mode === 'light') {
80+
else if (mode === 'false' /* for backwards compatibility */ || mode === 'light') {
8181
// If preference for light mode indicated
8282
set_mode(false);
8383
}

config/config.example.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ https_only: false
163163
#use_quic: false
164164

165165
##
166-
## Additionnal cookies to be sent when requesting the youtube API.
166+
## Additional cookies to be sent when requesting the youtube API.
167167
##
168168
## Accepted values: a string in the format "name1=value1; name2=value2..."
169169
## Default: <none>
@@ -188,7 +188,7 @@ https_only: false
188188

189189
##
190190
## Path to log file. Can be absolute or relative to the invidious
191-
## binary. This is overriden if "-o OUTPUT" or "--output=OUTPUT"
191+
## binary. This is overridden if "-o OUTPUT" or "--output=OUTPUT"
192192
## are passed on the command line.
193193
##
194194
## Accepted values: a filesystem path or 'STDOUT'
@@ -197,7 +197,7 @@ https_only: false
197197
#output: STDOUT
198198

199199
##
200-
## Logging Verbosity. This is overriden if "-l LEVEL" or
200+
## Logging Verbosity. This is overridden if "-l LEVEL" or
201201
## "--log-level=LEVEL" are passed on the command line.
202202
##
203203
## Accepted values: All, Trace, Debug, Info, Warn, Error, Fatal, Off
@@ -306,7 +306,7 @@ https_only: false
306306
##
307307
## Notes:
308308
## - Setting this to 0 will disable the channel videos crawl job.
309-
## - This setting is overriden if "-c THREADS" or
309+
## - This setting is overridden if "-c THREADS" or
310310
## "--channel-threads=THREADS" are passed on the command line.
311311
##
312312
## Accepted values: a positive integer
@@ -328,7 +328,7 @@ full_refresh: false
328328
##
329329
## Notes:
330330
## - Setting this to 0 will disable the channel videos crawl job.
331-
## - This setting is overriden if "-f THREADS" or
331+
## - This setting is overridden if "-f THREADS" or
332332
## "--feed-threads=THREADS" are passed on the command line.
333333
##
334334
## Accepted values: a positive integer
@@ -371,7 +371,7 @@ feed_threads: 1
371371

372372

373373
# -----------------------------
374-
# Miscellanous
374+
# Miscellaneous
375375
# -----------------------------
376376

377377
##
@@ -433,7 +433,7 @@ feed_threads: 1
433433
#cache_annotations: false
434434

435435
##
436-
## Source code URL. If your instance is running a modfied source
436+
## Source code URL. If your instance is running a modified source
437437
## code, you MUST publish it somewhere and set this option.
438438
##
439439
## Accepted values: a string
@@ -520,9 +520,9 @@ default_user_preferences:
520520
#region: US
521521

522522
##
523-
## Top 3 prefered languages for video captions.
523+
## Top 3 preferred languages for video captions.
524524
##
525-
## Note: overridin the default (no preferred
525+
## Note: overriding the default (no preferred
526526
## caption language) is not recommended, in order
527527
## to not penalize people using other languages.
528528
##
@@ -594,7 +594,7 @@ default_user_preferences:
594594
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
595595

596596
##
597-
## Default feed to diplay on the home page.
597+
## Default feed to display on the home page.
598598
##
599599
## Note: setting this option to "Popular" has no
600600
## effect when 'popular_enabled' is set to false.
@@ -812,7 +812,7 @@ default_user_preferences:
812812

813813

814814
# -----------------------------
815-
# Miscellanous
815+
# Miscellaneous
816816
# -----------------------------
817817

818818
##

src/invidious/config.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class Config
9191

9292
@[YAML::Field(converter: Preferences::FamilyConverter)]
9393
property force_resolve : Socket::Family = Socket::Family::UNSPEC # Connect to YouTube over 'ipv6', 'ipv4'. Will sometimes resolve fix issues with rate-limiting (see https://github.com/ytdl-org/youtube-dl/issues/21729)
94-
property port : Int32 = 3000 # Port to listen for connections (overrided by command line argument)
95-
property host_binding : String = "0.0.0.0" # Host to bind (overrided by command line argument)
94+
property port : Int32 = 3000 # Port to listen for connections (overridden by command line argument)
95+
property host_binding : String = "0.0.0.0" # Host to bind (overridden by command line argument)
9696
property pool_size : Int32 = 100 # Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
9797
property use_quic : Bool = false # Use quic transport for youtube api
9898

src/invidious/helpers/i18n.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def translate_count(locale : String, key : String, count : Int, format = NumberF
135135
# Try #2: Fallback to english
136136
translation = translate_count("en-US", key, count)
137137
else
138-
# Return key if we're already in english, as the tranlation is missing
138+
# Return key if we're already in english, as the translation is missing
139139
LOGGER.warn("i18n: Missing translation key \"#{key}\"")
140140
return key
141141
end

src/invidious/helpers/tokens.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def sign_token(key, hash)
4444

4545
# TODO: figure out which "key" variable is used
4646
# Ameba reports a warning for "Lint/ShadowingOuterLocalVar" on this
47-
# variable, but its preferrable to not touch that (works fine atm).
47+
# variable, but it's preferable to not touch that (works fine atm).
4848
hash.each do |key, value|
4949
next if key == "signature"
5050

src/invidious/helpers/utils.cr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ def short_text_to_number(short_text : String) : Int32
161161
end
162162

163163
def number_to_short_text(number)
164-
seperated = number_with_separator(number).gsub(",", ".").split("")
165-
text = seperated.first(2).join
164+
separated = number_with_separator(number).gsub(",", ".").split("")
165+
text = separated.first(2).join
166166

167-
if seperated[2]? && seperated[2] != "."
168-
text += seperated[2]
167+
if separated[2]? && separated[2] != "."
168+
text += separated[2]
169169
end
170170

171171
text = text.rchop(".0")
@@ -323,8 +323,8 @@ def fetch_random_instance
323323
instance_list.each do |data|
324324
# TODO Check if current URL is onion instance and use .onion types if so.
325325
if data[1]["type"] == "https"
326-
# Instances can have statisitics disabled, which is an requirement of version validation.
327-
# as_nil? doesn't exist. Thus we'll have to handle the error rasied if as_nil fails.
326+
# Instances can have statistics disabled, which is an requirement of version validation.
327+
# as_nil? doesn't exist. Thus we'll have to handle the error raised if as_nil fails.
328328
begin
329329
data[1]["stats"].as_nil
330330
next

src/invidious/playlists.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def fetch_playlist(plid : String)
401401
end
402402

403403
def get_playlist_videos(playlist : InvidiousPlaylist | Playlist, offset : Int32, video_id = nil)
404-
# Show empy playlist if requested page is out of range
404+
# Show empty playlist if requested page is out of range
405405
# (e.g, when a new playlist has been created, offset will be negative)
406406
if offset >= playlist.video_count || offset < 0
407407
return [] of PlaylistVideo

src/invidious/routes/preferences.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ module Invidious::Routes::PreferencesRoute
136136
notifications_only ||= "off"
137137
notifications_only = notifications_only == "on"
138138

139-
# Convert to JSON and back again to take advantage of converters used for compatability
139+
# Convert to JSON and back again to take advantage of converters used for compatibility
140140
preferences = Preferences.from_json({
141141
annotations: annotations,
142142
annotations_subscribed: annotations_subscribed,

src/invidious/yt_backend/extractors.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def extract_item(item : JSON::Any, author_fallback : String? = "",
568568

569569
# Cycles through all of the item parsers and attempt to parse the raw YT JSON data.
570570
# Each parser automatically validates the data given to see if the data is
571-
# applicable to itself. If not nil is returned and the next parser is attemped.
571+
# applicable to itself. If not nil is returned and the next parser is attempted.
572572
ITEM_PARSERS.each do |parser|
573573
LOGGER.trace("extract_item: Attempting to parse item using \"#{parser.parser_name}\" (cycling...)")
574574

0 commit comments

Comments
 (0)