appends hashtag + search_text to browser's url

This commit is contained in:
buttle 2022-03-15 22:45:28 +01:00
parent 2a0fc20f5d
commit 83c645c2fb
1 changed files with 5 additions and 2 deletions

View File

@ -43,8 +43,11 @@ export default {
},
methods: {
search: function() {
console.log('searching for: '+this.search_text)
var self = this
//console.log('searching for: '+this.search_text)
const uri = window.location.toString()
const withNoHash = uri.substring(0, uri.indexOf('#'))
//console.log('setting hash')
window.history.replaceState({}, document.title, withNoHash+'#'+this.search_text)
this.setSearchText(this.search_text)
this.siteSearch()
},