Skip to content

Commit 1e370f2

Browse files
committed
Header link contains the hash
1 parent 8f14594 commit 1e370f2

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

js/dfc/app.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var DFC = (function _DFC() {
3030
$addLens = $('.add-lens');
3131
$sortToggle = $('.sort-toggle');
3232
$sortOptions = $('.table-header > .row');
33-
$comparisonLinks = $('.comparison-link');
33+
$comparisonLinks = $('.comparison-link, .subheader a');
3434

3535
//To do: watch hashchange(?) event
3636
_readLensesFromHash();
@@ -149,12 +149,10 @@ var DFC = (function _DFC() {
149149
});
150150

151151
if (lensHashes.length || distance !== 20) {
152-
window.location.hash = '#' + distance + ';' + lensHashes.join(';');
153-
}
154-
else {
155-
window.location.hash = '';
152+
hash = '#' + distance + ';' + lensHashes.join(';');
156153
}
157154

155+
window.location.hash = hash;
158156
$comparisonLinks.attr('href', window.location.href);
159157
}
160158

0 commit comments

Comments
 (0)