Skip to content

Commit

Permalink
Apply standard --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri-janousek committed Nov 8, 2020
1 parent d9f00a5 commit 60ffb9c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions integrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
'use strict';

(function (Nuvola) {
var PlaybackState = Nuvola.PlaybackState
var PlayerAction = Nuvola.PlayerAction
var player = Nuvola.$object(Nuvola.MediaPlayer)
var WebApp = Nuvola.$WebApp()
const PlaybackState = Nuvola.PlaybackState
const PlayerAction = Nuvola.PlayerAction
const player = Nuvola.$object(Nuvola.MediaPlayer)
const WebApp = Nuvola.$WebApp()

WebApp._onInitWebWorker = function (emitter) {
Nuvola.WebApp._onInitWebWorker.call(this, emitter)

var state = document.readyState
const state = document.readyState
if (state === 'interactive' || state === 'complete') {
this._onPageReady()
} else {
Expand All @@ -47,7 +47,7 @@
}

WebApp.update = function () {
var track = {
const track = {
title: Nuvola.queryText('.Player-meta .Player-title span', (title) => title.replace('–', '').trim()),
artist: Nuvola.queryText('.Player-meta .Player-title a'),
album: Nuvola.queryText('.Player-meta .Player-album'),
Expand All @@ -68,7 +68,7 @@
}
player.setTrack(track)

var state = this._getState()
const state = this._getState()
player.setPlaybackState(state)
player.setCanPlay(state === PlaybackState.PAUSED)
player.setCanPause(state === PlaybackState.PLAYING)
Expand All @@ -92,7 +92,7 @@
}

WebApp._onActionActivated = function (emitter, name, param) {
var playButton = this._getPlayButton()
const playButton = this._getPlayButton()
switch (name) {
case PlayerAction.TOGGLE_PLAY:
case PlayerAction.PLAY:
Expand All @@ -104,4 +104,4 @@
}

WebApp.start()
})(this) // function(Nuvola)
})(this) // function(Nuvola)

0 comments on commit 60ffb9c

Please sign in to comment.