Greasy Fork is available in English.

LoggerJS

A simple library to make logging to the console a bit more nice to the eyes.

بۇ قوليازمىنى بىۋاسىتە قاچىلاشقا بولمايدۇ. بۇ باشقا قوليازمىلارنىڭ ئىشلىتىشى ئۈچۈن تەمىنلەنگەن ئامبار بولۇپ، ئىشلىتىش ئۈچۈن مېتا كۆرسەتمىسىگە قىستۇرىدىغان كود: // @require https://update.greatest.deepsurf.us/scripts/407905/831993/LoggerJS.js

  1. function logger(content, type = "log") {
  2. switch (type) {
  3. case "log": {
  4. var css = "background: #6495ED;";
  5. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  6. }
  7. case "warn": {
  8. var css = "background: #FF6600; color: black;"
  9. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  10. }
  11. case "error": {
  12. var css = "background: #FF0066"
  13. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  14. }
  15. case "debug": {
  16. var css = "color: #66FF00;"
  17. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  18. }
  19. case "cmd": {
  20. var css = "background: #FFFFFF; color: black;"
  21. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  22. }
  23. case "ready": {
  24. var css = "background: #66FF00; color: black;"
  25. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  26. }
  27. case "disconnect": {
  28. var css = "background: #FF0066"
  29. return console.log(`%c${type.toUpperCase()}`, `${css}`, `${content}`);
  30. }
  31. }
  32. };