Lichess Pieces: Go

Changes all chess pieces to Go stones of their respective color. This enables playing in a semi-blind mode.

  1. // ==UserScript==
  2. // @name Lichess Pieces: Go
  3. // @namespace http://userstyles.org
  4. // @description Changes all chess pieces to Go stones of their respective color. This enables playing in a semi-blind mode.
  5. // @author Abraham Hinteregger
  6. // @homepage https://userstyles.org/styles/156409
  7. // @include http://lichess.org/*
  8. // @include https://lichess.org/*
  9. // @include http://*.lichess.org/*
  10. // @include https://*.lichess.org/*
  11. // @run-at document-start
  12. // @version 0.20180301104942
  13. // ==/UserScript==
  14. (function() {var css = [
  15. " piece.pawn.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  16. " piece.knight.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  17. " piece.bishop.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  18. " piece.rook.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  19. " piece.queen.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  20. " piece.king.black{background-image: url(\"https://svgshare.com/i/5gv.svg\")!important;}",
  21. " piece.pawn.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}",
  22. " piece.knight.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}",
  23. " piece.bishop.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}",
  24. " piece.rook.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}",
  25. " piece.queen.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}",
  26. " piece.king.white{background-image: url(\"https://svgshare.com/i/5ih.svg\")!important;}"
  27. ].join("\n");
  28. if (typeof GM_addStyle != "undefined") {
  29. GM_addStyle(css);
  30. } else if (typeof PRO_addStyle != "undefined") {
  31. PRO_addStyle(css);
  32. } else if (typeof addStyle != "undefined") {
  33. addStyle(css);
  34. } else {
  35. var node = document.createElement("style");
  36. node.type = "text/css";
  37. node.appendChild(document.createTextNode(css));
  38. var heads = document.getElementsByTagName("head");
  39. if (heads.length > 0) {
  40. heads[0].appendChild(node);
  41. } else {
  42. // no head yet, stick it whereever
  43. document.documentElement.appendChild(node);
  44. }
  45. }
  46. })();