Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initTranslator()
.then( setEventHandlers );
// avoid Windows console errors
if ( typeof window.console === 'undefined' ) {
window.console = {
log() {}
};
}
if ( typeof window.console.debug === 'undefined' ) {
console.debug = console.log;
}
// override feature detection (for development purposes)
if ( settings.touch ) {
support.touch = true;
$( 'html' ).addClass( 'touch' );
} else if ( settings.touch === false ) {
support.touch = false;
$( 'html' ).removeClass( 'touch' );
}
}
function feedback( message, duration ) {
if ( !support.touch ) {
feedbackBar.show( message, duration );
} else {
alert( message, t( 'feedback.header' ), 'info', duration );
}
}