This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button | |
onClick={() => { | |
throw "Sentry is perfect and it catches every error!"; | |
}} | |
> | |
This button creates an error! | |
</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sentry.configureScope(function(scope) { | |
scope.setUser({"email": "[email protected]"}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using yarn | |
$ yarn add @sentry/browser | |
# Using npm | |
$ npm install @sentry/browser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import * as Sentry from '@sentry/browser'; | |
import App from 'src/App'; | |
Sentry.init({dsn: "https://[email protected]/<project>"}); | |
ReactDOM.render(<App />, document.getElementById('root')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window['_fs_debug'] = false; | |
window['_fs_host'] = 'fullstory.com'; | |
window['_fs_org'] = 'P71AM'; | |
window['_fs_namespace'] = 'FS'; | |
(function(m,n,e,t,l,o,g,y){ | |
if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;} | |
g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[]; | |
o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_host+'/s/fs.js'; | |
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(document, window){ | |
var styleText = '::-moz-focus-inner{border:0 !important;}:focus{outline: none !important;'; | |
var unfocus_style = document.createElement('STYLE'); | |
window.unfocus = function(){ | |
document.getElementsByTagName('HEAD')[0].appendChild(unfocus_style); | |
document.addEventListener('mousedown', function(){ | |
unfocus_style.innerHTML = styleText+'}'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div tabindex="0" role="button"> | |
This is a div but I'm a button for | |
</div> | |
<a tabindex="0" role="button"> | |
This is a Link but I'm a button for Screen readers | |
</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>GOOD LINKS</h2> | |
<a href="www.google.com">Link</a> | |
<a href="/newpage/file">Link</a> | |
<h2>BAD LINKS</h2> | |
<a onclick="window.location('www.google.com')">Link</a> | |
<a go="goto('www.google.com')">Link</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a.skip-main { | |
left:-999px; | |
position:absolute; | |
top:auto; | |
width:1px; | |
height:1px; | |
overflow:hidden; | |
z-index:-999; | |
} | |
a.skip-main:focus, a.skip-main:active { |