Skip to content

Commit

Permalink
add updateBrowserURL config var that controls whether JBrowse updat…
Browse files Browse the repository at this point in the history
…es the browser URL continuously with the share url
  • Loading branch information
rbuels committed Feb 26, 2013
1 parent a5ade57 commit 645faf1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
initialHighlight: queryParams.highlight,
show_nav: queryParams.nav,
show_tracklist: queryParams.tracklist,
show_overview: queryParams.overview
show_overview: queryParams.overview,
updateBrowserURL: true
});
});
</script>
Expand Down
5 changes: 5 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{{$NEXT}}

* By default, JBrowse now continuously updates the browser's URL bar
to contain a URL that will show the current JBrowse view directly.
This is enabled by default only if JBrowse is running from the
default index.html included in the JBrowse distribution.

* HTMLFeatures tracks now accept `style->label` and
`style->description` configuration variables variable that can be
set to a function callback that returns a string with the feature's
Expand Down
2 changes: 1 addition & 1 deletion src/JBrowse/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ Browser.prototype.makeShareLink = function () {
// connect moving and track-changing events to update it
var updateShareURL = function() {
shareURL = browser.makeCurrentViewURL();
if( window.history && window.history.replaceState )
if( browser.config.updateBrowserURL && window.history && window.history.replaceState )
window.history.replaceState( {},"", shareURL );
};
dojo.connect( this, "onCoarseMove", updateShareURL );
Expand Down

0 comments on commit 645faf1

Please sign in to comment.