项目作者: bbonnin

项目描述 :
Extension of the web console with some noises and speech
高级语言: JavaScript
项目地址: git://github.com/bbonnin/talking-console.git
创建时间: 2020-03-07T18:15:01Z
项目社区:https://github.com/bbonnin/talking-console

开源协议:MIT License

下载


talking-console

Overrides the console methods with speech synthesis… Useless, but fun :)

How to use

By default, a new global object tconsole is created. This object overrides the methods log, warn and error of console.
So, you just have to use the method console.log, console.warn and console.error as usual.

If you want to override the options, you can create a new instance:

  1. window.tconsole = new TalkingConsole({
  2. volumes: {
  3. log: 0.2,
  4. warn: 0.7,
  5. error: 1
  6. },
  7. prefixMsg: {
  8. log: 'New log',
  9. warn: 'New warn',
  10. error: 'New error'
  11. },
  12. wrapConsole: false
  13. })

If wrapConsole is set to false, the methods of console are not overridden, you will have to use tconsole.