URL is now shareable

pull/3/head
Marek Baczynski 2 years ago
parent 6077dd4228
commit 3754174c7d

@ -213,6 +213,9 @@ function show_part_info(partID) {
}).fail(function() { }).fail(function() {
console.log( "Fetching part info failed" ); console.log( "Fetching part info failed" );
}); });
// update URL and history
var query = $('.search-bar').val();
window.history.pushState('searching', '', 'parts?q=' + query + '&p=' + partID)
} }
function perform_query() { function perform_query() {
@ -245,6 +248,9 @@ function perform_query() {
$('#no-results').animate({opacity:1},2000); $('#no-results').animate({opacity:1},2000);
console.log( "Query failed" ); console.log( "Query failed" );
}); });
// update URL and history
window.history.pushState('searching', '', 'parts?q=' + query)
} }
function container_onchange() { function container_onchange() {

Loading…
Cancel
Save