function Error404() { return ( <Wrapper> <ErrorHeading>404</ErrorHeading> <ErrorDescription> We can’t seem to find this page. Please enjoy this comic before{' '} <ErrorLink onClick={() => window.history.back()}>going back</ErrorLink>{' '} or <ErrorLink href="https://resumake.io">going home</ErrorLink>. </ErrorDescription> <ComicContainer> <ComicImage src={comic} alt="Resume Comic" /> <ComicCite>Credit: Bob Eckstein (bobeckstein.com)</ComicCite> </ComicContainer> <ButtonContainer> <Button onClick={() => window.history.back()}>Go Back</Button> <LinkButton href="https://resumake.io">Go Home</LinkButton> </ButtonContainer> </Wrapper> ) }
ev.target.tagName !== 'TEXTAREA' ) { window.history.back(); } else if ( ev.keyCode === 73 && ev.shiftKey === true && ev.ctrlKey === true ) { electron.ipcRenderer.send( 'toggle-dev-tools' );
$('a[data-toggle="tab"][href="#revision-body"]').on('show.bs.tab', () => { // couln't solve https://github.com/weseek/crowi-plus/issues/119 completely -- 2017.07.03 Yuki Takei window.location.hash = '#'; window.history.replaceState('', '', window.location.href); });
// Chrome doesn't remember scroll position properly so do it ourselves. // Also works on Firefox and Edge. function updateState() { history.replaceState( { left_top: split_left.scrollTop, right_top: split_right.scrollTop }, document.title ); }
function scrollIntoView(targetId) { // Only scroll to element if we don't have a stored scroll position. if (targetId && !history.state) { var hashTarget = document.getElementById(targetId); if (hashTarget) { hashTarget.scrollIntoView(); } } }
function loadState(ev) { if (ev) { // Edge doesn't replace change history.state on popstate. history.replaceState(ev.state, document.title); } if (history.state) { split_left.scrollTop = history.state.left_top; split_right.scrollTop = history.state.right_top; } }
$('a[data-toggle="tab"][href="#edit"]').on('show.bs.tab', () => { window.history.replaceState('', 'Edit', '#edit'); });
$('a[data-toggle="tab"][href="#revision-body"]').on('show.bs.tab', () => { window.history.replaceState('', '', window.location.href.replace(window.location.hash, '')); });
$('a[data-toggle="tab"][href="#edit"]').on('show.bs.tab', () => { window.location.hash = '#edit'; window.history.replaceState('', 'Edit', '#edit'); });
function Error404() { return ( <Wrapper> <ErrorHeading>404</ErrorHeading> <ErrorDescription> We can’t seem to find this page. Please enjoy this comic before{' '} <ErrorLink onClick={() => window.history.back()}>going back</ErrorLink>{' '} or <ErrorLink href="https://resumake.io">going home</ErrorLink>. </ErrorDescription> <ComicContainer> <ComicImage src={comic} alt="Resume Comic" /> <ComicCite>Credit: Bob Eckstein (bobeckstein.com)</ComicCite> </ComicContainer> <ButtonContainer> <Button onClick={() => window.history.back()}>Go Back</Button> <LinkButton href="https://resumake.io">Go Home</LinkButton> </ButtonContainer> </Wrapper> ) }
$('a[data-toggle="tab"][href="#hackmd"]').on('show.bs.tab', () => { window.location.hash = '#hackmd'; window.history.replaceState('', 'HackMD', '#hackmd'); });
$('a[data-toggle="tab"][href="#revision-history"]').on('show.bs.tab', () => { window.location.hash = '#revision-history'; window.history.replaceState('', 'History', '#revision-history'); });
$('a[data-toggle="tab"][href="#revision-history"]').on('show.bs.tab', () => { window.history.replaceState('', 'History', '#revision-history'); });
$('a[data-toggle="tab"][href="#hackmd"]').on('show.bs.tab', () => { window.history.replaceState('', 'HackMD', '#hackmd'); });