Closed LukasGrebe closed 8 years ago
this clientside Code manipulates the query with every input change
$(':input').change( (function(){ locationUriObj = URI(window.location); return function(event){ locationUriObj.setSearch(event.target.id,event.target.value); window.history.replaceState({},document.title,locationUriObj.toString()) } })());
it uses URI.js to manipulate the window.location URL's query
Hi Lukas,
many thanks for pointing me to the history.replaceState()
method! I've updated shinyURL to make use of it, now the changes are reflected in real time in the browser's addressbar. You can hide shinyURL widgets all together by setting display = FALSE
in shinyURL.ui()
.
I've decided to leave the URL text field by default on, as it is useful in the context of displaying the shortened url. I might revisit this idea in future updates.
hi,
the broswers history.replaceState method updates the URL visible in the adressbar of the browser. I think it would be great to simply update the adressbar of the browser, instead of showing an extra UI element with the URL.