Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toggleModal() {
if (!bowser.chrome && !bowser.chromium && !bowser.firefox) {
let chromeMessage = (
<span>
This is a Google Chrome and Mozilla Firefox feature.{' '}
<a href="http://www.google.com/chrome/">
Please consider using Chrome or Firefox as your browser
</a>.
</span>
)
notifications.createAlert({
type: 'Error',
message: chromeMessage,
})
} else {
if (this.data.uploadStatus === 'uploading') {
this.update({ showModal: !this.data.showModal })
} else {
isPlanB() {
if (browser.chrome || browser.chromium || browser.opera)
return true;
else return false;
}
_click(e) {
e.stopPropagation()
e.target.value = null
if (!bowser.chrome && !bowser.chromium && !bowser.firefox) {
e.preventDefault()
toast.error(
<a href="http://www.google.com/chrome/">
Please consider using Chrome or Firefox as your browser.
</a>
,
)
}
if (this.props.onClick) {
this.props.onClick(e)
}
}
_click (e) {
this.refs.fileSelect.value = null;
e.stopPropagation();
if (!bowser.chrome && !bowser.chromium) {
let chromeMessage = (
<span>This is a Google Chrome only feature. <a href="http://www.google.com/chrome/">Please consider using Chrome as your browser</a>.</span>
);
e.preventDefault();
notifications.createAlert({
type: 'Error',
message: chromeMessage
});
}
if (this.state.uploadStatus === 'uploading') {
e.preventDefault();
notifications.createAlert({
type: 'Warning',
message: 'You may only upload one dataset at a time. Please wait for the current upload to finish, then try resuming again.'
});
}
render() {
let browserUnsupported =
!bowser.chrome && !bowser.chromium && !bowser.firefox
return (
<div id="root">
<nav>
<div>
<div>
<a href="https://www.npmjs.com/package/bids-validator">
BIDS Validator v{version}
</a>
</div>
</div>
</nav>
<div>
<div></div></div></div>
_click(e) {
e.stopPropagation()
if (!bowser.chrome && !bowser.chromium) {
let chromeMessage = (
<span>
This is a Google Chrome only feature.{' '}
<a href="http://www.google.com/chrome/">
Please consider using Chrome as your browser
</a>.
</span>
)
e.preventDefault()
notifications.createAlert({
type: 'Error',
message: chromeMessage,
})
}
if (this.state.upload.uploadStatus === 'uploading') {
e.preventDefault()
render() {
let browserUnsupported =
!bowser.chrome && !bowser.chromium && !bowser.firefox
return (
<div id="root">
<nav>
<div>
<div>
<a href="#">
BIDS Validator
</a>
</div>
</div>
</nav>
<div>
<div>
{browserUnsupported ? : null}
</div>
<div></div></div></div>