mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(listeners) pop
This commit is contained in:
parent
2baf29eadc
commit
65a48ca731
1 changed files with 4 additions and 6 deletions
|
|
@ -387,16 +387,14 @@ var Util, DOM, CloudCmd;
|
|||
|
||||
function pop() {
|
||||
Events.add('popstate', function(event) {
|
||||
var path;
|
||||
var path = event.state;
|
||||
|
||||
if (!event.state)
|
||||
CloudCmd.route(location.hash);
|
||||
else {
|
||||
path = event.state + '?json';
|
||||
if (path)
|
||||
CloudCmd.ajaxLoad(path, {
|
||||
nohistory: true
|
||||
});
|
||||
}
|
||||
else
|
||||
CloudCmd.route(location.hash);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue