Allow permalinking to lines

This commit is contained in:
Ammar Askar
2013-04-12 03:11:24 +05:00
parent abb49f2cf3
commit 40b02773eb
4 changed files with 41 additions and 5 deletions

View File

@@ -18,7 +18,8 @@
// Handle pops
var handlePop = function(evt) {
var path = evt.target.location.pathname;
if (path === '/') { app.newDocument(true); }
if (app.ignoreLast) { app.ignoreLast = false; }
else if (path === '/') { app.newDocument(true); }
else { app.loadDocument(path.substring(1, path.length)); }
};
// Set up the pop state to handle loads, skipping the first load