mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 03:40:09 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f1a90de9d3
commit
bd27dfa6de
15
ui/data.js
15
ui/data.js
@ -1654,6 +1654,7 @@ function setupBaseURLHistory(){
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function getURLHistoryPosition(){
|
||||
return BASE_URL_HISTORY.indexOf(BASE_URL)
|
||||
}
|
||||
@ -1666,12 +1667,18 @@ function getURLHistoryPrev(){
|
||||
return res == null ? BASE_URL : res
|
||||
}
|
||||
|
||||
function loadURLHistoryNext(){
|
||||
statusNotify(loadDir(getURLHistoryNext()))
|
||||
|
||||
function makeURLHistoryLoader(get){
|
||||
return function(){
|
||||
var url = get()
|
||||
if(url != BASE_URL){
|
||||
statusNotify(loadDir(url))
|
||||
}
|
||||
function loadURLHistoryPrev(){
|
||||
statusNotify(loadDir(getURLHistoryPrev()))
|
||||
return url
|
||||
}
|
||||
}
|
||||
var loadURLHistoryNext = makeURLHistoryLoader(getURLHistoryNext)
|
||||
var loadURLHistoryPrev = makeURLHistoryLoader(getURLHistoryPrev)
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user