filesbox/web/dist/design/designstatic/common/js/addSentry.js
2024-07-26 14:10:54 +08:00

2 lines
893 B
JavaScript

function addSentry(){try{if(window.Sentry)return;if(cdnPath=="//static.wxbig.cn"||cdnPath=="//pre-static.1x.cn")console.log("\u9884\u53D1||\u6B63\u5F0F");else return;var t=window.location.href;(t.indexOf("/pages/")>-1||t.indexOf("/views/")>-1)&&$.ajax({url:"/design/designstatic/common/js/sentry.js?t=202002231",cache:!0,success:function(){console.log("Sentry loaded"),Sentry.init({dsn:"https://bb703aa2662f4a24b5994c2d135958bc@sentry.wxbig.cn/2",release:"static@1.0.1",beforeSend:function(n){console.log("event:",n);try{let e=function(a,s){return a.indexOf(s)>-1};var l=e,c=n.exception||{},r=c.values||[];if(r.length>0){var i=r[0],o=i.value||"";if(e(o,"el_.vjs_getProperty")||e(o,"invalid"))return null}}catch(e){console.log("sentry \u4E8B\u4EF6\u8FC7\u6EE4:",e)}return n},ignoreErrors:["AbortError","NotAllowedError","INVALID_STATE_ERR"]})}})}catch(n){console.log("static:",n)}}addSentry();