Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
add in-page navigations to history (close #37)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Aug 15, 2016
1 parent 8b6669d commit 2a81e06
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/shell-window/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,17 @@ function onWillNavigate (e) {
// we need to update the url bar but no load event occurs
function onDidNavigateInPage (e) {
var page = getByWebview(e.target)
if (page)
if (page) {
// update ui
navbar.updateLocation(page)

// update history
var url = page.getURL()
if (!url.startsWith('beaker:')) {
beakerHistory.addVisit({ url: page.getURL(), title: page.getTitle() || page.getURL() }, warnIfError('history.addVisit'))
beakerBookmarks.addVisit(page.getURL(), warnIfError('bookmarks.addVisit'))
}
}
}

function onLoadCommit (e) {
Expand Down

0 comments on commit 2a81e06

Please sign in to comment.