Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from zalando-incubator/8-hide-filter
Browse files Browse the repository at this point in the history
Hide #broq-filter=.
  • Loading branch information
mrandi authored May 4, 2018
2 parents ccd13d8 + 814f042 commit 20bf537
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ function checkFilter() {
filter = $('#filter')
.val()
.toString();
port.postMessage({ json: input, filter: filter });
filter = encodeURIComponent(filter);
window.location.hash = 'broq-filter=' + filter;
if(filter != '.') {
port.postMessage({ json: input, filter: filter });
filter = encodeURIComponent(filter);
window.location.hash = 'broq-filter=' + filter;
} else if(window.location.hash.includes('#broq-filter=')) {
history.pushState("", document.title, window.location.pathname + window.location.search);
}
}

document.addEventListener('DOMContentLoaded', onLoad, false);

0 comments on commit 20bf537

Please sign in to comment.