Skip to content

Commit

Permalink
expand UI when query param is present
Browse files Browse the repository at this point in the history
make expand param more explicit
  • Loading branch information
rbren committed Apr 4, 2019
1 parent beb7791 commit b2887e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ $(function () {
console.log('parent', $(e.srcElement).parent('.resource-info'));
$(e.srcElement).parents('.resource-info').toggleClass('expanded');
});

var expandMatch = window.location.search.match(/expand=(\w+)(\W|$)/);
if (expandMatch && expandMatch[1] !== 'false' && expandMatch[1] !== '0') {
$('.resource-info').addClass('expanded');
}
});

0 comments on commit b2887e8

Please sign in to comment.