appends hashtag + search_text to browser's url
This commit is contained in:
parent
2a0fc20f5d
commit
83c645c2fb
|
@ -43,8 +43,11 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search: function() {
|
search: function() {
|
||||||
console.log('searching for: '+this.search_text)
|
//console.log('searching for: '+this.search_text)
|
||||||
var self = this
|
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.setSearchText(this.search_text)
|
||||||
this.siteSearch()
|
this.siteSearch()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue