diff --git a/docs/usage.md b/docs/usage.md index 3a09cc20..81747a4d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -34,7 +34,7 @@ Create a DOM element somewhere in your HTML document. This will eventually conta ```JavaScript import Winamp from 'winamp2-js'; -// Or, if you installed via a script tag, `Winamp` is avaliable on the global `window`: +// Or, if you installed via a script tag, `Winamp` is available on the global `window`: // const Winamp = window.winamp2js; // Check if Winamp is supported in this browser @@ -124,7 +124,7 @@ const options = { // Optional. An array of objects representing skins. // These will appear in the "Options" menu under "Skins". // Note: These URLs must be served the with correct CORs headers. - avaliableSkins: [ + availableSkins: [ { url: "./green.wsz", name: "Green Dimension V2" }, { url: "./osx.wsz", name: "Mac OSX v1.5 (Aqua)" } ], @@ -144,7 +144,7 @@ const options = { url: './rick_roll.mp3' }]), // A boolean indicating if this options should be made - // avaliable when the user is offline. + // available when the user is offline. requiresNetwork: true }] }; diff --git a/js/actionTypes.js b/js/actionTypes.js index 25f833c7..780df0db 100644 --- a/js/actionTypes.js +++ b/js/actionTypes.js @@ -49,7 +49,7 @@ export const REMOVE_ALL_TRACKS = "REMOVE_ALL_TRACKS"; export const CROP_TRACKS = "CROP_TRACKS"; export const FILE_INFO = "FILE_INFO"; export const REMOVE_TRACKS = "REMOVE_TRACKS"; -export const SET_AVALIABLE_SKINS = "SET_AVALIABLE_SKINS"; +export const SET_AVAILABLE_SKINS = "SET_AVAILABLE_SKINS"; export const REVERSE_LIST = "REVERSE_LIST"; export const RANDOMIZE_LIST = "RANDOMIZE_LIST"; export const SET_TRACK_ORDER = "SET_TRACK_ORDER"; diff --git a/js/components/MainWindow/MainContextMenu.js b/js/components/MainWindow/MainContextMenu.js index 3dc073e4..93794fdf 100644 --- a/js/components/MainWindow/MainContextMenu.js +++ b/js/components/MainWindow/MainContextMenu.js @@ -44,8 +44,8 @@ const MainContextMenu = props => ( - {!!props.avaliableSkins.length &&
} - {props.avaliableSkins.map(skin => ( + {!!props.availableSkins.length &&
} + {props.availableSkins.map(skin => ( props.setSkin(skin.url)} @@ -59,7 +59,7 @@ const MainContextMenu = props => ( ); const mapStateToProps = state => ({ - avaliableSkins: state.settings.avaliableSkins, + availableSkins: state.settings.availableSkins, networkConnected: state.network.connected }); diff --git a/js/index.js b/js/index.js index 80335535..c994ad22 100644 --- a/js/index.js +++ b/js/index.js @@ -58,7 +58,7 @@ Raven.context(() => { url: skinUrl }, initialTracks, - avaliableSkins: [ + availableSkins: [ { url: base, name: "" }, { url: green, name: "Green Dimension V2" }, { url: osx, name: "Mac OSX v1.5 (Aqua)" }, diff --git a/js/loadQueue.js b/js/loadQueue.js index 004ce2ec..8f516de9 100644 --- a/js/loadQueue.js +++ b/js/loadQueue.js @@ -12,7 +12,7 @@ export default class LoadQueue { // For example, we might add a track to the playlist and then scroll to/away // from it before it gets processed. this._queue = new TinyQueue([], (a, b) => a.priority() - b.priority()); - this._avaliableThreads = threads; + this._availableThreads = threads; } push(task, priority) { @@ -32,11 +32,11 @@ export default class LoadQueue { } _run() { - while (this._avaliableThreads > 0) { + while (this._availableThreads > 0) { if (this._queue.length === 0) { return; } - this._avaliableThreads--; + this._availableThreads--; const t = this._queue.pop(); const promise = t.task(); invariant( @@ -44,7 +44,7 @@ export default class LoadQueue { `LoadQueue only supports loading Promises. Got ${promise}` ); promise.then(() => { - this._avaliableThreads++; + this._availableThreads++; this._run(); }); } diff --git a/js/reducers/index.js b/js/reducers/index.js index 07c6c459..4e7f84f9 100644 --- a/js/reducers/index.js +++ b/js/reducers/index.js @@ -36,7 +36,7 @@ import { UNSET_USER_MESSAGE, SET_PLAYLIST_SCROLL_POSITION, PLAYLIST_SIZE_CHANGED, - SET_AVALIABLE_SKINS, + SET_AVAILABLE_SKINS, ADD_TRACK_FROM_URL, NETWORK_CONNECTED, NETWORK_DISCONNECTED @@ -135,13 +135,13 @@ const display = (state = defaultDisplayState, action) => { }; const defaultSettingsState = { - avaliableSkins: [] + availableSkins: [] }; const settings = (state = defaultSettingsState, action) => { switch (action.type) { - case SET_AVALIABLE_SKINS: - return { ...state, avaliableSkins: action.skins }; + case SET_AVAILABLE_SKINS: + return { ...state, availableSkins: action.skins }; default: return state; } diff --git a/js/skinParser.js b/js/skinParser.js index 5ad34cae..8e84b5d2 100644 --- a/js/skinParser.js +++ b/js/skinParser.js @@ -66,7 +66,7 @@ const _genImgFromBlob = async blob => const genImgFromBlob = async blob => { if (window.createImageBitmap) { try { - // Use this faster native browser API if avaliable. + // Use this faster native browser API if available. return await window.createImageBitmap(blob); } catch (e) { console.warn( diff --git a/js/winamp.js b/js/winamp.js index af318ed5..45003899 100644 --- a/js/winamp.js +++ b/js/winamp.js @@ -11,7 +11,7 @@ import { setSkinFromUrl, loadMediaFiles } from "./actionCreators"; import { LOAD_STYLE } from "./constants"; import { - SET_AVALIABLE_SKINS, + SET_AVAILABLE_SKINS, NETWORK_CONNECTED, NETWORK_DISCONNECTED } from "./actionTypes"; @@ -45,7 +45,7 @@ class Winamp { this.options = options; const { initialTracks, - avaliableSkins, + availableSkins, enableHotkeys = false } = this.options; @@ -67,10 +67,10 @@ class Winamp { if (initialTracks) { this.appendTracks(initialTracks); } - if (avaliableSkins) { + if (availableSkins) { this.store.dispatch({ - type: SET_AVALIABLE_SKINS, - skins: avaliableSkins + type: SET_AVAILABLE_SKINS, + skins: availableSkins }); }