(ev)
| 142 | } |
| 143 | |
| 144 | function loadState(ev) { |
| 145 | if (ev) { |
| 146 | // Edge doesn't replace change history.state on popstate. |
| 147 | history.replaceState(ev.state, document.title); |
| 148 | } |
| 149 | if (history.state) { |
| 150 | split_left.scrollTop = history.state.left_top; |
| 151 | split_right.scrollTop = history.state.right_top; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | window.addEventListener('load', function () { |
| 156 | // Restore after Firefox scrolls to hash. |