/* global electron */ let startApp = function () { document.location.replace( '/desktop/hey.html' ); }
// replace all href="#edit" link behaviors $(document).on('click', 'a[href="#edit"]', () => { window.location.replace('#edit'); });
element = tocElements[i]; if (!element.classList.contains('display-none')) { location.replace(element.firstChild.href); return e.preventDefault();
// Internal: Hard replace current state with url. // // Work for around WebKit // https://bugs.webkit.org/show_bug.cgi?id=93506 // // Returns nothing. function locationReplace(url) { window.history.replaceState(null, "", pjax.state.url) window.location.replace(url) }
handleGoogleLogin () { if (typeof this.props.location.query.next !== 'undefined') { sessionStorage.setItem('next', this.props.location.query.next) } window.location.replace('/api/auth/google') }
function _LogoutPage() { const dispatch = useDispatch(); async function logoutAndRedirect() { await dispatch(AuthActions.logout()); window.location.replace("/auth/login"); } useOnMount(() => { logoutAndRedirect(); }); return <h2>Logging out...</h2>; }
const removeToken = () => { localStorage.removeItem('dashboard_token'); localStorage.removeItem('dashboard_email'); localStorage.removeItem('dashboard_exp'); localStorage.removeItem('webstore_token'); localStorage.removeItem('webstore_email'); localStorage.removeItem('webstore_exp'); location.replace(LOGIN_PATH); }
const validateCurrentToken = () => { if (location.pathname !== LOGIN_PATH) { if (!isCurrentTokenValid()) { location.replace(LOGIN_PATH); } } }
function replaceHash (path) { var href = window.location.href; var i = href.indexOf('#'); var base = i >= 0 ? href.slice(0, i) : href; window.location.replace((base + "#" + path)); }
function checkFallback (base) { var location = getLocation(base); if (!/^\/#/.test(location)) { window.location.replace( cleanPath(base + '/#' + location) ); return true } }
removeHash() { window.location.replace('#'); }
const validateCurrentToken = () => { if (location.pathname !== LOGIN_PATH) { if (!isCurrentTokenValid()) { location.replace(LOGIN_PATH); } } }
function checkFallback (base) { const location = getLocation(base) if (!/^\/#/.test(location)) { window.location.replace( cleanPath(base + '/#' + location) ) return true } }