What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-22 08:22:18
js push param to url
function setQueryStringParameter(name, value) { const params = new URLSearchParams(window.location.search); params.set(name, value); window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`)); } Add solution -
Javascript 2021-11-12 14:45:22
react prevent back
const preventBack = (): void => { window.history.pushState(null, "", window.location.pathname); } const handleBack = (): void => { console.log('handleBack') } useEffect(() => { preventBack(); window.addEventListener('popstate'... Add solution -
Javascript 2021-10-26 13:31:18
js push params to url
function setQueryStringParameter(name, value) { const params = new URLSearchParams(window.location.search); params.set(name, value); window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`)); } Add solution -
Other 2021-10-11 05:29:06
Why is #_=_ appended to the redirect URI? passport facebook
$(window).on('load', function(e){ if (window.location.hash == '#_=_') { window.location.hash = ''; // for older browsers, leaves a # behind history.pushState('', document.title, window.location.pathname); // nice and clean e.preventDefault()... Add solution -
Javascript 2021-10-09 08:37:05
manually give path to the new route highlighting the menu item react
// passing in the routes as a list of items in the header //all paths that are not in menu item also needed to be added to the items list or on the path will give an error for undefined key //create a state for an active path const [active, setActive] =... Add solution -
Javascript 2021-10-04 00:29:03
js add params to url
function setQueryStringParameter(name, value) { const params = new URLSearchParams(window.location.search); params.set(name, value); window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`)); } Add solution