How to override the toastr options


#1

I found chrismbeckett_toastr.js present in .meteor/local/build/programs/web.browser/packages/chrismbeckett_toastr.js
I think we should not edit this file directly.

So, How can I override the toastr options for example adding class using toastClass and increasing the toastr duration.


#2

somewhere in a client file
( for example /client/startup.js )

Meteor.startup(function() {
  // Toastr Options
  toastr.options = {
    "closeButton": true,
    "debug": false,
    "newestOnTop": false,
    "progressBar": true,
    "positionClass": "toast-top-center",
    "preventDuplicates": false,
    "onclick": null,
    "showDuration": "300",
    "hideDuration": "1000",
    "timeOut": "3000",
    "extendedTimeOut": "1000",
    "showEasing": "swing",
    "hideEasing": "linear",
    "showMethod": "fadeIn",
    "hideMethod": "fadeOut"
  }
})