mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added endless scroll (closed #5)
The code for paged collections now feels like playing ping-pong with callbacks, and like I have no idea on who should render who. It works, though.
This commit is contained in:
@ -14,6 +14,15 @@ App.Router = function(pathJs, _, jQuery, util, appState, presenterManager) {
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
function navigateInplace(url) {
|
||||
if ('replaceState' in history) {
|
||||
history.replaceState('', '', url);
|
||||
pathJs.dispatch(document.location.hash);
|
||||
} else {
|
||||
navigate(url);
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
pathJs.listen();
|
||||
}
|
||||
@ -54,6 +63,7 @@ App.Router = function(pathJs, _, jQuery, util, appState, presenterManager) {
|
||||
return {
|
||||
start: start,
|
||||
navigate: navigate,
|
||||
navigateInplace: navigateInplace,
|
||||
navigateToMainPage: navigateToMainPage,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user