nl_tokens: Message
pl_tokens: function showMessage ( message , messageBtn ) { var uiMessage = document . querySelectorAll ( message ) , uiMessageBtn = <mask> . querySelectorAll ( messageBtn ) , timeOut = 2000 , // Becouse animation: fadeOutUp .3s timeOutUp = timeOut - 1700 ; // console.log(uiMessageBtn) // Only Message without button if ( uiMessageBtn . length === 0 ) { for ( var i = 0 ; i < uiMessage . length ; i ++ ) { var uiMessage = uiMessage [ i ] ; showAndHideMessage ( ) ; } } // Message with button for ( var i = 0 ; i < uiMessage . length ; i ++ ) { var uiMessage = uiMessage [ i ] , uiMessageBtn = uiMessageBtn [ i ] ; uiMessageBtn . onclick = function ( ) { showAndHideMessage ( ) ; } ; } function showAndHideMessage ( ) { uiMessage . style . display = 'flex' ; // Animation uiMessage . classList . add ( 'fadeInDown' ) ; uiMessage . classList . remove ( 'fadeOutUp' ) ; setTimeout ( function ( ) { setTimeout ( function ( ) { uiMessage . style . display = 'none' ; } , timeOutUp ) ; // Animation uiMessage . classList . add ( 'fadeOutUp' ) ; uiMessage . classList . remove ( 'fadeInDown' ) ; } , timeOut ) ; } }