Add location.url() shorthand
location.url() === location.current().url
This commit is contained in:
@@ -22,7 +22,7 @@ function App (state) {
|
||||
// * The mouse is over the controls or we're scrubbing (see CSS)
|
||||
// * The video is paused
|
||||
// * The video is playing remotely on Chromecast or Airplay
|
||||
var hideControls = state.location.current().url === 'player' &&
|
||||
var hideControls = state.location.url() === 'player' &&
|
||||
state.playing.mouseStationarySince !== 0 &&
|
||||
new Date().getTime() - state.playing.mouseStationarySince > 2000 &&
|
||||
!state.playing.isPaused &&
|
||||
@@ -30,10 +30,10 @@ function App (state) {
|
||||
|
||||
// Hide the header on Windows/Linux when in the player
|
||||
// On OSX, the header appears as part of the title bar
|
||||
var hideHeader = process.platform !== 'darwin' && state.location.current().url === 'player'
|
||||
var hideHeader = process.platform !== 'darwin' && state.location.url() === 'player'
|
||||
|
||||
var cls = [
|
||||
'view-' + state.location.current().url, /* e.g. view-home, view-player */
|
||||
'view-' + state.location.url(), /* e.g. view-home, view-player */
|
||||
'is-' + process.platform /* e.g. is-darwin, is-win32, is-linux */
|
||||
]
|
||||
if (state.window.isFullScreen) cls.push('is-fullscreen')
|
||||
@@ -81,6 +81,6 @@ function getModal (state) {
|
||||
}
|
||||
|
||||
function getView (state) {
|
||||
var url = state.location.current().url
|
||||
var url = state.location.url()
|
||||
return Views[url](state)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user