diff --git a/web/elfeed.js b/web/elfeed.js index bdab089..dc12582 100644 --- a/web/elfeed.js +++ b/web/elfeed.js @@ -19,7 +19,10 @@ function entryFill(entry) { } function SearchCtrl($scope, $http) { - $scope.query = INITIAL_QUERY; + // Populate query scope with value passed in URL query parameters, if any. + var query_via_url = new URLSearchParams(window.location.search).get("q"); + + $scope.query = query_via_url || INITIAL_QUERY; $scope.busy = false; $scope.dirty = true;