URL is now shareable

This commit is contained in:
2022-11-28 20:23:43 +01:00
parent 6077dd4228
commit 3754174c7d
+6
View File
@@ -213,6 +213,9 @@ function show_part_info(partID) {
}).fail(function() {
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() {
@@ -245,6 +248,9 @@ function perform_query() {
$('#no-results').animate({opacity:1},2000);
console.log( "Query failed" );
});
// update URL and history
window.history.pushState('searching', '', 'parts?q=' + query)
}
function container_onchange() {