Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const nodeType = await Network.checkConnectivity();
dispatch(
platformReducer.actions.setActiveNodeType(nodeType)
);
await onSuccessfulCheck({ dispatch, getState });
}
} catch (error) {
console.debug("Error in healthCheck!", error.toString());
dispatch(networkReducer.actions.setNoProviderConnected(true));
dispatch(networkReducer.actions.disconnected());
// setTimeout(() => location.reload(true), 5000);
}
}, 1000, dispatch, getState);
};
Raven.context(function() {
(async () => {
try {
await bootstrap();
} catch (e) {
console.log(e);
}
ReactDOM.render(
,
document.getElementById("root")
);
})();
});
document.addEventListener('DOMContentLoaded', () => {
Raven.context(() => {
if (window.shr) {
window.shr.setup({
count: {
classname: 'button__count',
},
});
}
// Setup tab focus
const tabClassName = 'tab-focus';
// Remove class on blur
document.addEventListener('focusout', event => {
event.target.classList.remove(tabClassName);
});
document.addEventListener('DOMContentLoaded', () => {
Raven.context(() => {
const selector = '#player';
const container = document.getElementById('container');
if (window.Shr) {
window.Shr.setup('.js-shr-button', {
count: {
classname: 'button__count',
},
});
}
// Setup tab focus
const tabClassName = 'tab-focus';
// Remove class on blur
document.addEventListener('focusout', event => {
]
}
).install();
var throwsError = () => {
throw new Error('broken');
};
try {
throwsError();
} catch(e) {
RavenJS.captureException(e);
RavenJS.captureException(e, {tags: { key: "value" }});
}
RavenJS.context(throwsError);
RavenJS.context({tags: { key: "value" }}, throwsError);
RavenJS.context({extra: {planet: {name: 'Earth'}}}, throwsError);
setTimeout(RavenJS.wrap(throwsError), 1000);
RavenJS.wrap({logger: "my.module"}, throwsError)();
RavenJS.wrap({tags: {git_commit: 'c0deb10c4'}}, throwsError)();
RavenJS.setUserContext({
email: 'matt@example.com',
id: '123'
});
RavenJS.captureMessage('Broken!');
RavenJS.captureMessage('Broken!', {tags: { key: "value" }});
RavenJS.showReportDialog({
}
};
}
};
})
.catch((error) => {
console.error('Error during service worker registration:', error);
});
}
/**
* @name bootstrap-app
*/
if (process.env.NODE_ENV === 'production') {
Raven.config(process.env.SENTRY_URL).install();
Raven.context(() => pages());
} else {
pages();
}
import StreamAnalytics from 'stream-analytics';
import config from './config';
Raven.config(config.sentry, {
release: config.version,
}).install();
window.streamClient = stream.connect(config.stream.apiKey, null, config.stream.appID);
window.streamAnalyticsClient = new StreamAnalytics({
apiKey: config.stream.apiKey,
token: config.stream.analyticsKey,
});
Raven.context(() => {
ReactDOM.render(, document.getElementById('root'));
});
}, (err, docs) => {
if (err) {
log.info('DOWNLOADER: Error in ignoreDupeTorrents (db.find)');
Raven.captureException(err);
Raven.showReportDialog();
}
if (docs.length > 0) {
if (docs[0].downloaded === true) {
callback('dupe');
} else if (docs[0].downloaded === false) {
callback();
}
} else {
Raven.context(() => {
Raven.captureBreadcrumb({
data: {
torrent
}
});
db.insert({
_id: torrent.link,
magnet: torrent.link,
title: torrent.title,
tvdbID: torrent['tv:show_name']['#'],
airdate: torrent['rss:pubdate']['#'],
downloaded: false
});
callback();
});
}
import Raven from "raven-js";
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import config from "./config";
import "./index.scss";
if (config.SENTRY_URI) {
Raven.config(config.SENTRY_URI).install();
}
Raven.context(function() {
ReactDOM.render(, document.getElementById("root"));
});
function newListener(listener, ...args) {
try {
Raven.context(() => listener(...args));
} catch (e) {
const debug = require('./debug');
debug.error('Failed executing listener callback', e.stack);
}
}
return new Promise((resolve, reject) => {
if (window.Dropbox == null) {
reject();
}
window.Dropbox.choose({
success: resolve,
error: reject,
linkType: "direct",
folderselect: false,
multiselect: true,
extensions: ["video", "audio"]
});
});
}
Raven.context(() => {
if (hideAbout) {
document.getElementsByClassName("about")[0].style.visibility = "hidden";
}
if (!Winamp.browserIsSupported()) {
document.getElementById("browser-compatibility").style.display = "block";
document.getElementById("app").style.visibility = "hidden";
return;
}
const winamp = new Winamp({
initialSkin: {
url: skinUrl
},
initialTracks,
availableSkins: [
{ url: base, name: "" },