Github Nyan Cat Star

Makes GitHub make sense again

  1. // ==UserScript==
  2. // @name Github Nyan Cat Star
  3. // @namespace https://github.com/EastSun5566
  4. // @version 0.0.7
  5. // @description Makes GitHub make sense again
  6. // @author Michael Wang
  7. // @license MIT
  8. // @homepageURL https://github.com/EastSun5566
  9. // @match https://github.com/**
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=nyan.cat
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // @ts-check
  15.  
  16. (function () {
  17. /** tweak from {@url https://github.com/Gowee/nyancat-svg} */
  18. const NYAN_CAT_SVG = `
  19. <svg xmlns="http://www.w3.org/2000/svg" x="120" y="58.5" width="30" viewBox="0 0 34 21" preserveAspectRatio="xMinYMin meet" style="vertical-align: sub;">
  20. <!-- All cat-frames are adapted from https://github.com/iliana/html5nyancat . -->
  21. <style>
  22. .cat-frame {
  23. opacity: 0;
  24. }
  25.  
  26. #cat-frame6 {
  27. animation: catrun 0.42s linear 0.35s infinite;
  28. }
  29.  
  30. #cat-frame5 {
  31. animation: catrun 0.42s linear 0.28s infinite;
  32. }
  33.  
  34. #cat-frame4 {
  35. animation: catrun 0.42s linear 0.21s infinite;
  36. }
  37.  
  38. #cat-frame3 {
  39. animation: catrun 0.42s linear 0.14s infinite;
  40. }
  41.  
  42. #cat-frame2 {
  43. animation: catrun 0.42s linear 0.07s infinite;
  44. }
  45.  
  46. #cat-frame1 {
  47. animation: catrun 0.42s linear 0s infinite;
  48. }
  49.  
  50. @keyframes catrun {
  51. 0% {
  52. opacity: 1;
  53. }
  54.  
  55. 16.666666% {
  56. opacity: 1;
  57. }
  58.  
  59. 16.6666666% {
  60. opacity: 0;
  61. }
  62.  
  63. 100% {
  64. opacity: 0;
  65. }
  66. }
  67. </style>
  68. <g id="cat-frame1" class="cat-frame">
  69. <g transform="translate(1,0)" id="layer1" style="display:inline">
  70. <g transform="translate(4,-1032.3622)" id="g3832">
  71. <path d="m 0,50 0,-3 1,0 0,-1 4,0 0,3 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3050"
  72. style="fill:#000000;fill-opacity:1;stroke:none" />
  73. <path d="m 1,49 0,-2 3,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3830"
  74. style="fill:#999999;fill-opacity:1;stroke:none" />
  75. </g>
  76. <g transform="translate(4,-1032.3622)" id="g3841">
  77. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  78. style="fill:#000000;fill-opacity:1;stroke:none" />
  79. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  80. style="fill:#999999;fill-opacity:1;stroke:none" />
  81. </g>
  82. <g transform="matrix(-1,0,0,1,29,-1032.3622)" id="g3935">
  83. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  84. style="fill:#000000;fill-opacity:1;stroke:none" />
  85. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  86. style="fill:#999999;fill-opacity:1;stroke:none" />
  87. </g>
  88. <g transform="translate(0,-1032.3622)" id="g3948">
  89. <path d="m 24,49 0,-1 4,0 0,1 -1,0 0,1 -2,0 0,-1 z" transform="translate(0,1002.3622)" id="path3941"
  90. style="fill:#000000;fill-opacity:1;stroke:none" />
  91. <path d="m 25,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3943"
  92. style="fill:#999999;fill-opacity:1;stroke:none" />
  93. </g>
  94. <g transform="translate(0,-1032.3622)" id="layer1-0">
  95. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  96. <path
  97. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  98. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  99. <path
  100. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  101. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  102. <path
  103. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  104. id="path5412" style="fill:#000000;fill-opacity:1" />
  105. </g>
  106. <g transform="translate(6,0)" id="layer3">
  107. <g id="g5869">
  108. <path
  109. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  110. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  111. <path
  112. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  113. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  114. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  115. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  116. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  117. style="fill:#000000;fill-opacity:1;stroke:none" />
  118. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  119. <g id="g5857">
  120. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795" style="fill:#000000;fill-opacity:1;stroke:none" />
  121. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  122. </g>
  123. <g transform="translate(-7,0)" id="g5861">
  124. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863" style="fill:#000000;fill-opacity:1;stroke:none" />
  125. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  126. </g>
  127. </g>
  128. </g>
  129. <g id="g3486">
  130. <path d="M 0,10 0,7 4,7 4,8 5,8 5,9 6,9 6,14 5,14 5,13 3,13 3,12 2,12 2,11 1,11 1,10 z" id="path3954"
  131. style="fill:#000000;fill-opacity:1;stroke:none" />
  132. <path d="m 1,9 0,-1 2,0 0,1 1,0 0,1 1,0 0,1 1,0 0,1 -2,0 0,-1 -1,0 0,-1 -1,0 0,-1 z" id="path3956"
  133. style="fill:#999999;fill-opacity:1;stroke:none" />
  134. </g>
  135. </g>
  136. </g>
  137.  
  138. <g id="cat-frame2" class="cat-frame">
  139. <g transform="translate(1,-1)" id="g4196">
  140. <g transform="translate(0,-1031.3622)" id="layer1">
  141. <g id="g3982">
  142. <path d="m 5,20 0,-3 1,0 0,-1 3,0 0,3 -1,0 0,1 z" transform="translate(0,1032.3622)" id="path3977"
  143. style="fill:#000000;fill-opacity:1;stroke:none" />
  144. <path d="m 6,17 2,0 0,2 -2,0 z" transform="translate(0,1032.3622)" id="rect3979"
  145. style="fill:#999999;fill-opacity:1;stroke:none" />
  146. </g>
  147. <g transform="matrix(-1,0,0,1,20,0)" id="g3841">
  148. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  149. style="fill:#000000;fill-opacity:1;stroke:none" />
  150. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  151. style="fill:#999999;fill-opacity:1;stroke:none" />
  152. </g>
  153. <g transform="matrix(-1,0,0,1,30,0)" id="g3935">
  154. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  155. style="fill:#000000;fill-opacity:1;stroke:none" />
  156. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  157. style="fill:#999999;fill-opacity:1;stroke:none" />
  158. </g>
  159. <g id="layer1-0">
  160. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  161. <path
  162. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  163. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  164. <path
  165. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  166. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  167. <path
  168. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  169. id="path5412" style="fill:#000000;fill-opacity:1" />
  170. </g>
  171. <g transform="translate(7,1032.3622)" id="layer3">
  172. <g id="g5869">
  173. <path
  174. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  175. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  176. <path
  177. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  178. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  179. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  180. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  181. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  182. style="fill:#000000;fill-opacity:1;stroke:none" />
  183. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  184. <g id="g5857">
  185. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795"
  186. style="fill:#000000;fill-opacity:1;stroke:none" />
  187. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  188. </g>
  189. <g transform="translate(-7,0)" id="g5861">
  190. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863"
  191. style="fill:#000000;fill-opacity:1;stroke:none" />
  192. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  193. </g>
  194. </g>
  195. </g>
  196. <g transform="matrix(-1,0,0,1,35,0)" id="g3986">
  197. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3988"
  198. style="fill:#000000;fill-opacity:1;stroke:none" />
  199. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3990"
  200. style="fill:#999999;fill-opacity:1;stroke:none" />
  201. </g>
  202. <g id="g3996">
  203. <path d="m 1,12 -1,0 0,-2 1,0 0,-1 2,0 0,1 1,0 0,1 2,0 0,4 -2,0 0,-1 -2,0 0,-1 -1,0 z"
  204. transform="translate(0,1032.3622)" id="path3992" style="fill:#000000;stroke:none" />
  205. <path d="m 1,12 0,-2 2,0 0,2 3,0 0,2 -2,0 0,-1 -2,0 0,-1 z" transform="translate(0,1032.3622)" id="path3994"
  206. style="fill:#999999;fill-opacity:1;stroke:none" />
  207. </g>
  208. </g>
  209. </g>
  210. </g>
  211.  
  212. <g id="cat-frame3" class="cat-frame">
  213. <g transform="translate(1,1)" id="g4137">
  214. <g id="g3806">
  215. <path d="m 6,20 0,-4 4,0 0,3 -1,0 0,1 z" id="path3977" style="fill:#000000;fill-opacity:1;stroke:none" />
  216. <path d="m 7,17 2,0 0,2 -2,0 z" id="rect3979" style="fill:#999999;fill-opacity:1;stroke:none" />
  217. </g>
  218. <g transform="matrix(-1,0,0,1,21,-1032.3622)" id="g3841">
  219. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  220. style="fill:#000000;fill-opacity:1;stroke:none" />
  221. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  222. style="fill:#999999;fill-opacity:1;stroke:none" />
  223. </g>
  224. <g transform="matrix(-1,0,0,1,31,-1032.3622)" id="g3935">
  225. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  226. style="fill:#000000;fill-opacity:1;stroke:none" />
  227. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  228. style="fill:#999999;fill-opacity:1;stroke:none" />
  229. </g>
  230. <g transform="translate(0,-1032.3622)" id="layer1-0">
  231. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  232. <path
  233. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  234. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  235. <path
  236. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  237. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  238. <path
  239. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  240. id="path5412" style="fill:#000000;fill-opacity:1" />
  241. </g>
  242. <g transform="translate(7,0)" id="layer3">
  243. <g id="g5869">
  244. <path
  245. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  246. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  247. <path
  248. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  249. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  250. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  251. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  252. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  253. style="fill:#000000;fill-opacity:1;stroke:none" />
  254. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  255. <g id="g5857">
  256. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795" style="fill:#000000;fill-opacity:1;stroke:none" />
  257. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  258. </g>
  259. <g transform="translate(-7,0)" id="g5861">
  260. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863" style="fill:#000000;fill-opacity:1;stroke:none" />
  261. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  262. </g>
  263. </g>
  264. </g>
  265. <g transform="matrix(-1,0,0,1,36,-1032.3622)" id="g3986">
  266. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3988"
  267. style="fill:#000000;fill-opacity:1;stroke:none" />
  268. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3990"
  269. style="fill:#999999;fill-opacity:1;stroke:none" />
  270. </g>
  271. <g id="g4584">
  272. <path d="m 0,14 0,-2 2,0 0,-1 3,0 0,-1 1,0 0,4 -1,0 0,1 -4,0 0,-1 z" id="path3812"
  273. style="fill:#000000;stroke:none" />
  274. <path d="m 1,14 0,-1 1,0 0,-1 4,0 0,1 -2,0 0,1 z" id="path3814" style="fill:#999999;stroke:none" />
  275. </g>
  276. </g>
  277. </g>
  278.  
  279. <g id="cat-frame4" class="cat-frame">
  280. <g transform="translate(1,0)" id="g4082">
  281. <g transform="translate(0,-1031.3622)" id="g3982">
  282. <path d="m 5,20 0,-3 1,0 0,-1 3,0 0,3 -1,0 0,1 z" transform="translate(0,1032.3622)" id="path3977-4"
  283. style="fill:#000000;fill-opacity:1;stroke:none" />
  284. <path d="m 6,17 2,0 0,2 -2,0 z" transform="translate(0,1032.3622)" id="rect3979-3"
  285. style="fill:#999999;fill-opacity:1;stroke:none" />
  286. </g>
  287. <g transform="matrix(-1,0,0,1,20,-1031.3622)" id="g3841">
  288. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  289. style="fill:#000000;fill-opacity:1;stroke:none" />
  290. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  291. style="fill:#999999;fill-opacity:1;stroke:none" />
  292. </g>
  293. <g transform="matrix(-1,0,0,1,30,-1031.3622)" id="g3935">
  294. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  295. style="fill:#000000;fill-opacity:1;stroke:none" />
  296. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  297. style="fill:#999999;fill-opacity:1;stroke:none" />
  298. </g>
  299. <g transform="translate(0,-1031.3622)" id="layer1-0">
  300. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  301. <path
  302. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  303. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  304. <path
  305. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  306. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  307. <path
  308. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  309. id="path5412" style="fill:#000000;fill-opacity:1" />
  310. </g>
  311. <g transform="translate(7,1)" id="layer3">
  312. <g id="g5869">
  313. <path
  314. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  315. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  316. <path
  317. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  318. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  319. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  320. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  321. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  322. style="fill:#000000;fill-opacity:1;stroke:none" />
  323. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  324. <g id="g5857">
  325. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795" style="fill:#000000;fill-opacity:1;stroke:none" />
  326. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  327. </g>
  328. <g transform="translate(-7,0)" id="g5861">
  329. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863" style="fill:#000000;fill-opacity:1;stroke:none" />
  330. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  331. </g>
  332. </g>
  333. </g>
  334. <g transform="matrix(-1,0,0,1,35,-1031.3622)" id="g3986">
  335. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3988"
  336. style="fill:#000000;fill-opacity:1;stroke:none" />
  337. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3990"
  338. style="fill:#999999;fill-opacity:1;stroke:none" />
  339. </g>
  340. <g transform="matrix(1,0,0,-1,0,1058.3622)" id="g4887">
  341. <path d="m 1,12 -1,0 0,-2 1,0 0,-1 2,0 0,1 1,0 0,1 2,0 0,4 -2,0 0,-1 -2,0 0,-1 -1,0 z"
  342. transform="translate(0,1032.3622)" id="path4889" style="fill:#000000;stroke:none" />
  343. <path d="m 1,12 0,-2 2,0 0,2 3,0 0,2 -2,0 0,-1 -2,0 0,-1 z" transform="translate(0,1032.3622)" id="path4891"
  344. style="fill:#999999;fill-opacity:1;stroke:none" />
  345. </g>
  346. </g>
  347. </g>
  348.  
  349. <g id="cat-frame5" class="cat-frame">
  350. <g transform="translate(1,0)" id="g4025">
  351. <g transform="translate(0,1)" id="g5089">
  352. <path d="m 3,20 0,-3 1,0 0,-1 1,0 0,-1 3,0 0,3 -1,0 0,1 -1,0 0,1 z" id="path5085"
  353. style="fill:#000000;stroke:none" />
  354. <path d="m 4,19 0,-2 1,0 0,-1 2,0 0,2 -1,0 0,1 z" id="path5087" style="fill:#999999;stroke:none" />
  355. </g>
  356. <g transform="matrix(-1,0,0,1,20,-1031.3622)" id="g3841">
  357. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  358. style="fill:#000000;fill-opacity:1;stroke:none" />
  359. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  360. style="fill:#999999;fill-opacity:1;stroke:none" />
  361. </g>
  362. <g transform="matrix(-1,0,0,1,28,-1031.3622)" id="g3935">
  363. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  364. style="fill:#000000;fill-opacity:1;stroke:none" />
  365. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  366. style="fill:#999999;fill-opacity:1;stroke:none" />
  367. </g>
  368. <g transform="translate(0,-1031.3622)" id="layer1-0">
  369. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  370. <path
  371. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  372. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  373. <path
  374. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  375. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  376. <path
  377. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  378. id="path5412" style="fill:#000000;fill-opacity:1" />
  379. </g>
  380. <g transform="translate(6,1)" id="layer3">
  381. <g id="g5869">
  382. <path
  383. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  384. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  385. <path
  386. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  387. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  388. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  389. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  390. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  391. style="fill:#000000;fill-opacity:1;stroke:none" />
  392. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  393. <g id="g5857">
  394. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795" style="fill:#000000;fill-opacity:1;stroke:none" />
  395. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  396. </g>
  397. <g transform="translate(-7,0)" id="g5861">
  398. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863" style="fill:#000000;fill-opacity:1;stroke:none" />
  399. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  400. </g>
  401. </g>
  402. </g>
  403. <g transform="matrix(-1,0,0,1,33,-1031.3622)" id="g3986">
  404. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3988"
  405. style="fill:#000000;fill-opacity:1;stroke:none" />
  406. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3990"
  407. style="fill:#999999;fill-opacity:1;stroke:none" />
  408. </g>
  409. <g transform="translate(0,1)" id="g5097">
  410. <path d="M -1,11 -1,9 0,9 0,8 4,8 4,9 6,9 6,13 4,13 4,12 1,12 1,11 z" id="path5093"
  411. style="fill:#000000;stroke:none" />
  412. <path d="m 0,10 0,-1 3,0 0,1 2,0 0,1 1,0 0,1 -1,0 0,-1 -4,0 0,-1 z" id="path5095"
  413. style="fill:#999999;stroke:none" />
  414. </g>
  415. </g>
  416. </g>
  417.  
  418. <g id="cat-frame6" class="cat-frame">
  419. <g transform="translate(1,0)" id="g3968">
  420. <g transform="translate(0,1)" id="g5089">
  421. <path d="m 3,20 0,-3 1,0 0,-1 1,0 0,-1 3,0 0,3 -1,0 0,1 -1,0 0,1 z" id="path5085"
  422. style="fill:#000000;stroke:none" />
  423. <path d="m 4,19 0,-2 1,0 0,-1 1,0 0,1 1,0 0,1 -1,0 0,1 z" id="path5087" style="fill:#999999;stroke:none" />
  424. </g>
  425. <g transform="matrix(-1,0,0,1,32,-1031.3622)" id="g3982">
  426. <path d="m 5,20 0,-3 1,0 0,-1 3,0 0,3 -1,0 0,1 z" transform="translate(0,1032.3622)" id="path3977"
  427. style="fill:#000000;fill-opacity:1;stroke:none" />
  428. <path d="m 6,17 2,0 0,2 -2,0 z" transform="translate(0,1032.3622)" id="rect3979"
  429. style="fill:#999999;fill-opacity:1;stroke:none" />
  430. </g>
  431. <g transform="translate(3,-1031.3622)" id="g3841">
  432. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3836"
  433. style="fill:#000000;fill-opacity:1;stroke:none" />
  434. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="rect3838"
  435. style="fill:#999999;fill-opacity:1;stroke:none" />
  436. </g>
  437. <g transform="translate(12,-1031.3622)" id="g3935">
  438. <path d="m 6,50 0,-2 4,0 0,1 -1,0 0,1 z" transform="translate(0,1002.3622)" id="path3937"
  439. style="fill:#000000;fill-opacity:1;stroke:none" />
  440. <path d="m 7,48 2,0 0,1 -2,0 z" transform="translate(0,1002.3622)" id="path3939"
  441. style="fill:#999999;fill-opacity:1;stroke:none" />
  442. </g>
  443. <g transform="translate(0,-1031.3622)" id="layer1-0">
  444. <path d="m 7,1033.3622 19,0 0,16 -19,0 z" id="rect5270" style="fill:#ffcc99;fill-opacity:1" />
  445. <path
  446. d="m 8,1046.3622 0,-10 1,0 0,-1 1,0 0,-1 13,0 0,1 1,0 0,1 1,0 0,10 -1,0 0,1 -1,0 0,1 -13,0 0,-1 -1,0 0,-1 z"
  447. id="path5272" style="fill:#ff99ff;fill-opacity:1;stroke:none" />
  448. <path
  449. d="m 22,1037.3622 1,0 0,1 -1,0 z m -4,-2 1,0 0,1 -1,0 z m -3,0 1,0 0,1 -1,0 z m -1,4 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m -2,3 1,0 0,1 -1,0 z m -2,-4 1,0 0,1 -1,0 z m -2,2 1,0 0,1 -1,0 z m 1,3 1,0 0,1 -1,0 z m 0,-10 1,0 0,1 -1,0 z"
  450. id="rect5030-3-6" style="fill:#ff3399;fill-opacity:1" />
  451. <path
  452. d="m 8,1049.3622 17,0 0,1 -17,0 z m 0,-17 17,0 0,1 -17,0 z m 18,16 0,-14 1,0 0,14 z m -20,0 0,-14 1,0 0,14 z m 1,0 1,0 0,1 -1,0 z m 0,-15 1,0 0,1 -1,0 z m 18,0 1,0 0,1 -1,0 z m 0,15 1,0 0,1 -1,0 z"
  453. id="path5412" style="fill:#000000;fill-opacity:1" />
  454. </g>
  455. <g transform="translate(6,0)" id="layer3">
  456. <g id="g5869">
  457. <path
  458. d="m 11,15 0,-5 1,0 0,-4 2,0 0,1 1,0 0,1 1,0 0,1 4,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,4 1,0 0,5 -1,0 0,1 -1,0 0,1 -10,0 0,-1 -1,0 0,-1 z"
  459. id="path5777" style="fill:#999999;fill-opacity:1;stroke:none" />
  460. <path
  461. d="m 23,16 1,0 0,1 -1,0 z m 1,-1 1,0 0,1 -1,0 z m 1,-5 1,0 0,5 -1,0 z m -1,-4 1,0 0,4 -1,0 z m -2,-1 2,0 0,1 -2,0 z m -6,3 4,0 0,1 -4,0 z m -4,-3 2,0 0,1 -2,0 z m -1,1 1,0 0,4 -1,0 z m -1,4 1,0 0,5 -1,0 z m 11,-4 1,0 0,1 -1,0 z m -1,1 1,0 0,1 -1,0 z m -5,0 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z m -1,11 10,0 0,1 -10,0 z m -1,-1 1,0 0,1 -1,0 z m -1,-1 1,0 0,1 -1,0 z"
  462. id="rect5496-38" style="fill:#000000;fill-opacity:1;stroke:none" />
  463. <path d="m 12,13 2,0 0,2 -2,0 z" id="rect5779" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  464. <path d="m 23,13 2,0 0,2 -2,0 z" id="rect5781" style="fill:#ff9999;fill-opacity:1;stroke:none" />
  465. <path d="m 15,16 0,-2 1,0 0,1 2,0 0,-1 1,0 0,1 2,0 0,-1 1,0 0,2 z" id="path5785"
  466. style="fill:#000000;fill-opacity:1;stroke:none" />
  467. <path d="m 19,12 1,0 0,1 -1,0 z" id="rect5787" style="fill:#000000;fill-opacity:1;stroke:none" />
  468. <g id="g5857">
  469. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5795" style="fill:#000000;fill-opacity:1;stroke:none" />
  470. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5797" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  471. </g>
  472. <g transform="translate(-7,0)" id="g5861">
  473. <path d="m 21,13 0,-1 1,0 0,-1 1,0 0,2 z" id="path5863" style="fill:#000000;fill-opacity:1;stroke:none" />
  474. <path d="m 21,11 1,0 0,1 -1,0 z" id="path5865" style="fill:#ffffff;fill-opacity:1;stroke:none" />
  475. </g>
  476. </g>
  477. </g>
  478. <g transform="translate(0,-1033.3622)" id="g3996">
  479. <path d="m 1,12 -1,0 0,-2 1,0 0,-1 2,0 0,1 1,0 0,1 2,0 0,4 -2,0 0,-1 -2,0 0,-1 -1,0 z"
  480. transform="translate(0,1032.3622)" id="path3992" style="fill:#000000;stroke:none" />
  481. <path d="m 1,12 0,-2 2,0 0,2 3,0 0,2 -2,0 0,-1 -2,0 0,-1 z" transform="translate(0,1032.3622)" id="path3994"
  482. style="fill:#999999;fill-opacity:1;stroke:none" />
  483. </g>
  484. </g>
  485. </g>
  486. </svg>
  487. `;
  488. const svg = new DOMParser()
  489. .parseFromString(NYAN_CAT_SVG, 'image/svg+xml')
  490. .documentElement;
  491.  
  492. const mountNyanCat = () => {
  493. svg.style.filter = '';
  494. /** @type {SVGElement[]} */
  495. const starIcons = Array.from(document.querySelectorAll('.octicon-star'));
  496. starIcons.forEach((icon) => {
  497. icon.replaceWith(svg.cloneNode(true));
  498. });
  499.  
  500. svg.style.filter = 'sepia(100%) contrast(150%)';
  501. /** @type {SVGElement[]} */
  502. const starredIcons = Array.from(document.querySelectorAll('.octicon-star-fill'));
  503. starredIcons.forEach((icon) => {
  504. icon.replaceWith(svg.cloneNode(true));
  505. });
  506. };
  507.  
  508. const observer = new MutationObserver(mountNyanCat);
  509. observer.observe(document.body, {
  510. childList: true,
  511. subtree: true,
  512. });
  513.  
  514. mountNyanCat();
  515. }());

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址