Greasy Fork 支持简体中文。

console-message-v2

Rich text console logging

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/389748/730537/console-message-v2.js

作者
spiralx
版本
2.0.0
建立日期
2019-09-04
更新日期
2019-09-04
尺寸
13.3 KB
授權條款
未知

console-message-v2.js - rich-text console logging

Revamped version of library written using ES6 and with some added functionality.

Based on the original console.message library (the old version can be @required as a library from here still).

Example
console.message()
  .span({ color: 'red' })
    .text('this is red! ')
    .text('this is green! ', { color: 'green' })
    .text('this is again red!')
  .line('info')
  .object(console)
  .trace()
  .line()
  .element(document.body)
  .print()