GitHub 隱藏 Copilot

在 GitHub 上隱藏愚蠢的 Copilot

  1. // ==UserScript==
  2. // @name GitHub No Copilot
  3. // @name:aa GitHub Hub Hide Kopilot
  4. // @name:ab GitHub акопилот
  5. // @name:af Github verberg kopilot
  6. // @name:ak GitHub sie Copilot .
  7. // @name:am Github ደብዛዛ ኮፒሎክ
  8. // @name:ar جيثب إخفاء CoPilot
  9. // @name:as Github লুকুৱাওক
  10. // @name:av GitHub Бахчунеб Копилот
  11. // @name:ay GitHub imantat copilot .
  12. // @name:az Github copilotu gizlət
  13. // @name:ba GitHub йәшерергә Копилот
  14. // @name:be Github схаваць капілот
  15. // @name:bg GitHub скрийте копилот
  16. // @name:bh गिटहब छिपावे के कोपायलट 1।
  17. // @name:bm GitHub dogo copilot .
  18. // @name:bn গিটহাব লুকান কপিলট
  19. // @name:bo GitHub Hide ཀོ་པི་ལོ་ཊི།
  20. // @name:br GitHub kuzhat kopilot
  21. // @name:bs GitHub Sakrij kopilot
  22. // @name:ca Github amaga el copilot
  23. // @name:ce GitHub Hide Copilot
  24. // @name:ceb Gitukor ang Github Copilot
  25. // @name:ch GitHub Hide
  26. // @name:ckb گیتوب شاردنەوەی کۆپایڵۆت
  27. // @name:co Github oculta copilot
  28. // @name:cs GitHub skrýt copilot
  29. // @name:cv GitHub пытаннă Копилот
  30. // @name:cy Github cuddio copilot
  31. // @name:da GitHub skjul copilot
  32. // @name:de Github Copilot verstecken
  33. // @name:dv ގިތަބް ފޮރުވާ ކޮޕީލަޓް
  34. // @name:dz GitHub སྦ་གསང་འགག་པ།
  35. // @name:ee Github Ɣla Copilot .
  36. // @name:el Github απόκρυψη copilot
  37. // @name:en GitHub Hide Copilot
  38. // @name:en-GB GitHub Hide Copilot
  39. // @name:eo Github kaŝas kopiloton
  40. // @name:es Github Ocultar copiloto
  41. // @name:es-419 Github Ocultar copiloto
  42. // @name:et GitHub peida kopilot
  43. // @name:eu GitHub ezkutatu kopilotoa
  44. // @name:fa Github مخفی کردن کپیلوت
  45. // @name:ff Kopilot GitHub Hide
  46. // @name:fi Github piilota kopilotti
  47. // @name:fil GITHUB Itago ang Copilot
  48. // @name:fj Git Huub Hit Copilocity .
  49. // @name:fo GitHub goyma meg
  50. // @name:fr Copilot de masquage GitHub
  51. // @name:fr-CA Copilot de masquage GitHub
  52. // @name:fy GitHub ferbergje Copilot
  53. // @name:ga GitHub hide copilot
  54. // @name:gd Falaich Github Cuir leth-bhreac
  55. // @name:gl GitHub ocultar o copiloto
  56. // @name:gn GitHub Oñomi Copilot .
  57. // @name:gsw-berne GitHub Hide Copilot
  58. // @name:gu ગિટહબ છુપાવો કોપાયલોટ
  59. // @name:gv GitHub Copilot
  60. // @name:ha Github Boye Copilot
  61. // @name:he Github הסתר Copilot
  62. // @name:hi Github छिपाएं कोपिलॉट
  63. // @name:hmn Github hos copilot
  64. // @name:hr Github sakrij copilot
  65. // @name:ht Github kache copilot
  66. // @name:hu GitHub elrejtése Copilot
  67. // @name:hy Github թաքցնել Copilot
  68. // @name:id GitHub Sembunyikan kopilot
  69. // @name:ig GitUB kwuru Copalit
  70. // @name:is Github fela Copilot
  71. // @name:it Github nascondi il copilota
  72. // @name:iu GitHub ᐃᔨᖅᓯᒪᔪᖅ ᑯᐱᓚᑦ
  73. // @name:ja Github Hide Copilot
  74. // @name:jv Github Singidaken copilot
  75. // @name:ka Github დამალვა კოპილოტი
  76. // @name:kg GitHub Kubumba Copilote
  77. // @name:kk Github Copilot жасырыңыз
  78. // @name:kl GitHub Hide Kopilot
  79. // @name:km Github Huse Copilt
  80. // @name:kn ಗಿಥಬ್ ಮರೆಮಾಡಿ ಕಾಪಿಲೆಟ್
  81. // @name:ko github copilot을 숨 깁니다
  82. // @name:kr GitHubbe gəraata
  83. // @name:ku Github copilot veşêre
  84. // @name:kv ГитХаб дзебӧм коляс .
  85. // @name:ky Github copilot жашты
  86. // @name:la Gitub celare copilot
  87. // @name:lb Github verstoppt Copilot
  88. // @name:lg GitHub Hide Copilot .
  89. // @name:ln GitHub Bomba Copilot .
  90. // @name:lo github ຊ່ອນ copilot
  91. // @name:lt „GitHub“ paslėpti kopilotą
  92. // @name:lv Github paslēpt copilot
  93. // @name:mg Github manafina copilot
  94. // @name:mh Kapilōklōk in GitHub .
  95. // @name:mi Githib Huna te Kaipupuri
  96. // @name:mk Github скријте го копилот
  97. // @name:ml Githubo copolt മറയ്ക്കുക
  98. // @name:mn Github нуух Copilot
  99. // @name:mo Github ascunde copilotul
  100. // @name:mr गिटहब लपवा कोपिलॉट
  101. // @name:ms Github menyembunyikan copilot
  102. // @name:mt Github Aħbi Copilot
  103. // @name:my GitHub Hide Copilot
  104. // @name:nb GitHub skjuler Copilot
  105. // @name:ne Ghithuub को कंबोट लुकाउनुहोस्
  106. // @name:nl GitHub verbergen copilot
  107. // @name:nr Ukukhiqizwa Kuphumelele .
  108. // @name:ny Gitub Bisani Corpilot
  109. // @name:oc Copilot de Amaga de GitHub .
  110. // @name:om Github Dhoksuu Koopiloot .
  111. // @name:or ଗିଟୋବ କପିଲଟ୍ ଲୁଚାନ୍ତୁ |
  112. // @name:os ГитХуб æмбæхсæн копилот
  113. // @name:pa ਗੀਥਾਮ ਨੇ ਕੋਲਾਓਲੋਟ
  114. // @name:pl Github Hide Copilot
  115. // @name:ps ګیټوب پټه
  116. // @name:pt Github ocultar copiloto
  117. // @name:pt-BR Github ocultar copiloto
  118. // @name:pt-PT Github ocultar copiloto
  119. // @name:qu GitHub pakay copiloto .
  120. // @name:rn GitHub Hide Copilot
  121. // @name:ro Github ascunde copilotul
  122. // @name:ru GitHub скрыть копилот
  123. // @name:rw Github Hisha Copilot
  124. // @name:sa Github कोपायलट छिपाएँ .
  125. // @name:sd گٽب ڪوپليٽ لڪايو
  126. // @name:se GitHub Hide Copilot
  127. // @name:sg GitHub ti Hide Copilote
  128. // @name:sh ГитХуб Сакриј Цопилот
  129. // @name:si GitHub සඟවන්න සහායක
  130. // @name:sk Github skryť copilot
  131. // @name:sl GitHub Skrij kopilot
  132. // @name:sm GitHub Finder CoplipTot
  133. // @name:sn GitHub viga copilot
  134. // @name:so GitHub wuxuu qariyaa copilot
  135. // @name:sq GitHub fsheh Copilot
  136. // @name:sr ГитХуб Сакриј Цопилот
  137. // @name:ss GitHub Fihla Ikhophisi
  138. // @name:st Githeb Pabisa Compilot
  139. // @name:su Github Sumputkeun Copilot
  140. // @name:sv GitHub döljer copilot
  141. // @name:sw GitHub Ficha Copilot
  142. // @name:ta கிதுப் மறைக்க கோபிலட்
  143. // @name:te గితుబ్ కాపిలోట్ దాచు
  144. // @name:tg Github Copylotро пинҳон кунед
  145. // @name:th GitHub ซ่อน Copilot
  146. // @name:ti ጂቱብ ምሕባእ ኮፒሎት
  147. // @name:tk Github Kopiloty gizleýär
  148. // @name:tl GITHUB Itago ang Copilot
  149. // @name:tn GitHub Fitlhela Mofenyi
  150. // @name:to GitHub Fufū Copilot
  151. // @name:tr Github Copilot’u gizle
  152. // @name:ts GitHub hide copilot .
  153. // @name:tt Github copillotны яшерегез
  154. // @name:tw GitHub sie Copilot .
  155. // @name:ty GitHub Hide
  156. // @name:ug Github Rock نى يوشۇرۇش
  157. // @name:uk Github приховати копілот
  158. // @name:ur گٹ ہب کوپائلٹ چھپائیں
  159. // @name:uz Githubni yashirish Kopilot
  160. // @name:ve Khophilotho ya u dzumba GitHub
  161. // @name:vi GitHub ẩn Copilot
  162. // @name:wo GitHub Hide Copilot
  163. // @name:xh I-GitITUB Fifilot Copot
  164. // @name:yi Github Hide Coopilot
  165. // @name:yo Githit Stapa Coprilot
  166. // @name:zh GitHub 隐藏 Copilot
  167. // @name:zh-CN GitHub 隐藏 Copilot
  168. // @name:zh-HK GitHub 隱藏 Copilot
  169. // @name:zh-MO GitHub 隱藏 Copilot
  170. // @name:zh-MY GitHub 隐藏 Copilot
  171. // @name:zh-SG GitHub 隐藏 Copilot
  172. // @name:zh-TW GitHub 隱藏 Copilot
  173. // @name:zu UGitHub Fihla Copilot
  174. // @description Hiding Silly Copilot in GitHub
  175. // @description:aa GitHub il tan qoxxo
  176. // @description:ab Иҵәахны иҵәахтәуп Акопилот GitHub аҟны
  177. // @description:af Verberg dom kopilot op github
  178. // @description:ak Fa copilot a ɛyɛ nkwaseasɛm sie wɔ github so .
  179. // @description:am በ Github ላይ ደደብ ኮፒቹን ደብቅ
  180. // @description:ar إخفاء copilot الغبي على جيثب
  181. // @description:as Github on githib
  182. // @description:av Выдате глупые Копилот на GitHub
  183. // @description:ay Github ukan stupid copiloto imantaña .
  184. // @description:az Github-da axmaq kopilotu gizlət
  185. // @description:ba Йәшерергә ахмаҡ Копилот GitHub
  186. // @description:be Схаваць дурны капілот на github
  187. // @description:bg Скрий глупавия копилот на GitHub
  188. // @description:bh गिटहब पर बेवकूफ कोपायलट के छिपाईं
  189. // @description:bm Aw ye nalomanya kopilit dogo GitHub kan .
  190. // @description:bn গিটহাবের উপর বোকা কপাইলট লুকান
  191. // @description:bo གྷི་ཊི་ཧབ་ཀྱི་གླེན་པ་གླེན་པ་སྦ་བ།
  192. // @description:br Kuzhat Kopilot stupid ar GitHub
  193. // @description:bs Sakrij glupi kopilot na Github-u
  194. // @description:ca Amaga un copilot estúpid a github
  195. // @description:ce Лечкъийна сонта Копилот на GitHub .
  196. // @description:ceb Itago ang hungog nga copilot sa Gitub
  197. // @description:ch Siha i manma’ayek gi GinHub .
  198. // @description:ckb هاوشین کۆپایڵۆتی گەمژە لە GitHub
  199. // @description:co Oculta stupidu copili in GitHub
  200. // @description:cs Skrýt hloupý copilot na githubu
  201. // @description:cv Пытарнă ухмах Копилот çинче GitHub
  202. // @description:cy Cuddio copilot gwirion ar github
  203. // @description:da Skjul dum copilot på github
  204. // @description:de Verstecke dumme Copilot auf Github
  205. // @description:dv ގިޓްހަބްގައި މޮޔަ ކޮޕީލަޓެއް ފޮރުވާ
  206. // @description:dz གི་ཊི་ཧབ་གུ་ ཀོཔ་ལོཊ་ སྦ་བཞག་དགོ།
  207. // @description:ee Hide stupid copilot le Github .
  208. // @description:el Απόκρυψη ηλίθιου copilot στο github
  209. // @description:en Hide stupid Copilot on GitHub
  210. // @description:en-GB Hide stupid Copilot on GitHub
  211. // @description:eo Kaŝu stultan kopiloton sur github
  212. // @description:es Ocultar estúpido copiloto en Github
  213. // @description:es-419 Ocultar estúpido copiloto en Github
  214. // @description:et Peida rumal kopilot githubil
  215. // @description:eu Ezkutatu Copilot ergelak GitHub-en
  216. // @description:fa کپی احمقانه را در Github پنهان کنید
  217. // @description:ff Suuɗde Kopilot ɓuuɓɗo e GitHub
  218. // @description:fi Piilota tyhmä kopilotti Githubiin
  219. // @description:fil Itago ang hangal na copilot sa GitHub
  220. // @description:fj Isea na Copilot lialia ena Git Hub .
  221. // @description:fo Goym heimskuliga Kapilot á GitHub
  222. // @description:fr Cacher un copilote stupide sur github
  223. // @description:fr-CA Cacher un copilote stupide sur github
  224. // @description:fy Ferbergje domme kopoot op GitHub
  225. // @description:ga Folaigh copilot dúr ar github
  226. // @description:gd Cuir am falach coplot gòrach air github
  227. // @description:gl Ocultar o copiloto estúpido en github
  228. // @description:gn Eñomi Copilot tavy GitHub-pe .
  229. // @description:gsw-berne Hide stupid Copilot on GitHub
  230. // @description:gu ગિટહબ પર મૂર્ખ કોપાયલોટ છુપાવો
  231. // @description:gv Copilot stupid er GitHub
  232. // @description:ha Ideoye bawan copilot a kan Giterub
  233. // @description:he הסתר קופילוט טיפש ב- Github
  234. // @description:hi GitHub पर बेवकूफ कोपिलॉट छिपाएं
  235. // @description:hmn Nkaum ruam copilot ntawm github
  236. // @description:hr Sakrij glupi kopilot na githubu
  237. // @description:ht Kache Copilot estipid sou GitHub
  238. // @description:hu Rejteni a hülye ropilotot a githubon
  239. // @description:hy Թաքցրեք հիմար պատնեշը github- ում
  240. // @description:id Sembunyikan kopilot bodoh di github
  241. // @description:ig Zoo nzuzu na Github
  242. // @description:is Fela heimskulega copilot á github
  243. // @description:it Nascondi stupido copilota su github
  244. // @description:iu ᐃᔨᖅᓯᒪᓗᒍ ᓯᓚᐃᕐᕆᔮᖅᑐᖅ ᑯᐱᓚᑦ GitHub-ᒥ
  245. // @description:ja githubに愚かな副操縦士を隠します
  246. // @description:jv Singidaken copilot bodoh ing Github
  247. // @description:ka დამალვა სულელური კოპილოტი github- ზე
  248. // @description:kg Bumba Copilot ya buzoba na GitHub
  249. // @description:kk Github-да ақымақ копилот жасырыңыз
  250. // @description:kl GitHub-imi copilot-imik stupid-imik toqqoqqavoq
  251. // @description:km លាក់ចលនា full ល្ងីល្ងើលើ GitHub
  252. // @description:kn ಗಿಟ್‌ಹಬ್‌ನಲ್ಲಿ ಸ್ಟುಪಿಡ್ ಕಾಪಿಲೆಟ್ ಅನ್ನು ಮರೆಮಾಡಿ
  253. // @description:ko github에 멍청한 copilot을 숨 깁니다
  254. // @description:kr Copilot kəla GitHubben gəragata
  255. // @description:ku Copilotê bêaqil li Github veşêrin
  256. // @description:kv ГитХаб вылын дзебӧй дурӧма Копилот .
  257. // @description:ky Акылсыз копилотту гитубка жашыруу
  258. // @description:la Abscondere stultus copilot in Github
  259. // @description:lb Verstoppen domm Copilot op Github
  260. // @description:lg hide omusiru copilot ku github .
  261. // @description:ln Bomba copilot ya buzoba na GitHub .
  262. // @description:lo ຊ່ອນ copilot ທີ່ໂງ່ຈ້າໃນ GitHub
  263. // @description:lt Paslėpkite kvailą kopilotą ant „GitHub“
  264. // @description:lv Paslēpt stulbu kopilotu uz github
  265. // @description:mg Afeno ny copilot vendrana amin’ny github
  266. // @description:mh Kōjparok Kapilōkōt eo ebwebwe ilo GitHub .
  267. // @description:mi Hunaia te kaimono poauau i runga i te githib
  268. // @description:mk Скријте го глупавиот копилот на github
  269. // @description:ml GitHub- ൽ മണ്ടൻ കോപിലോട്ട് മറയ്ക്കുക
  270. // @description:mn GitHub дээр тэнэг копилотыг нуу
  271. // @description:mo Ascunde copilot prost pe github
  272. // @description:mr गीथबवर मूर्ख कोपिलॉट लपवा
  273. // @description:ms Sembunyikan copilot bodoh di github
  274. // @description:mt Aħbi Copilot stupidu fuq github
  275. // @description:my GitHub တွင်မိုက်မဲသော Copilot ကိုဖျောက်ထားပါ
  276. // @description:nb Skjul dum kopilot på github
  277. // @description:ne Ghitub मा मूर्ख कपिलोट लुकाउनुहोस्
  278. // @description:nl Verberg domme copilot op GitHub
  279. // @description:nr Nazi uGABHA imali sakho;
  280. // @description:ny Bisani Cuprot Wopusa pa Gitib
  281. // @description:oc Amagar Copilot stupid en GitHub .
  282. // @description:om GitHub irratti gowwummaa dhoksi .
  283. // @description:or ଗିଥବରେ ମୂର୍ଖ କପିଲ୍ଟ ଲୁଚାନ୍ତୁ |
  284. // @description:os Æмбæхсут æдылы Копилот GitHub-ыл
  285. // @description:pa ਗਿੱਟਬ ’ਤੇ ਮੂਰਖ ਕਾੱਪਿਲਟ ਨੂੰ ਲੁਕਾਓ
  286. // @description:pl Ukryj głupiego copilota na github
  287. // @description:ps په ګیټوب کې احمق کاپي کړئ
  288. // @description:pt Esconder copiloto estúpido no github
  289. // @description:pt-BR Esconder copiloto estúpido no github
  290. // @description:pt-PT Esconder copiloto estúpido no github
  291. // @description:qu Paka tonto copiloto en GitHub .
  292. // @description:rn Igitunguru c’ikijuju kuri GitHub
  293. // @description:ro Ascunde copilot prost pe github
  294. // @description:ru Скрыть глупый копило на GitHub
  295. // @description:rw Hisha Copilot School kuri GitHub
  296. // @description:sa GitHub पर मूर्ख कोपायलट को छिपाएँ।
  297. // @description:sd گٽب تي بيوقوف ڪوپلوٽ لڪايو
  298. // @description:se Hide stupid Copilot GitHubas
  299. // @description:sg Hide zo ti buba Copilot na GitHub .
  300. // @description:sh Сакриј глупи копилот на Гитхуб-у
  301. // @description:si GitHub හි මෝඩ සහායකු සඟවන්න
  302. // @description:sk Skryť hlúpy copilot na GitHub
  303. // @description:sl Skrij neumni kopilot na githubu
  304. // @description:sm Nana le amio valea i luga o GitHub
  305. // @description:sn Viga benzi kopi pane GitHub
  306. // @description:so Qari Lopilot doqon oo ku saabsan githab
  307. // @description:sq Fshihni Copilot budalla në GitHub
  308. // @description:sr Сакриј глупи копилот на Гитхуб-у
  309. // @description:ss Fihla iKhaphilothi yesiphukuphuku ku-GitHub
  310. // @description:st Pata ho hlophisa lintho tse booatla ho github
  311. // @description:su Sumputkeun copilot bodo dina github
  312. // @description:sv Dölj dum copilot på github
  313. // @description:sw Ficha Copilot ya kijinga kwenye Github
  314. // @description:ta கிட்ஹப்பில் முட்டாள் கோபிலட்டை மறைக்கவும்
  315. // @description:te గితుబ్‌లో స్టుపిడ్ కాపిలోట్‌ను దాచండి
  316. // @description:tg Канилҳои беақлро дар github пинҳон кунед
  317. // @description:th ซ่อน Copilot โง่ ๆ ใน GitHub
  318. // @description:ti ኣብ ጊቱብ ዓሻ ኮፒሎት ምሕባእ
  319. // @description:tk Githubadaky samsyk kopiloty gizläň
  320. // @description:tl Itago ang hangal na copilot sa GitHub
  321. // @description:tn Fitlha Copilot yo o sematla mo GitHub
  322. // @description:to Fufuua e Copilot vale i he GitHub .
  323. // @description:tr Github’da Aptal Copilot’u gizle
  324. // @description:ts Fihla xiphukuphuku xa xiphukuphuku eka GitHub .
  325. // @description:tt Github’та ахмак полосилотны яшерегез
  326. // @description:tw Fa copilot a ɛyɛ nkwaseasɛm sie wɔ github so .
  327. // @description:ty Hide i ni’a i te GitHub
  328. // @description:ug GitHub دىكى ئەخمەق نۇسخىسىنى يوشۇرۇش
  329. // @description:uk Сховати дурний копілот на github
  330. // @description:ur گٹ ہب پر بیوقوف کوپائلٹ چھپائیں
  331. // @description:uz Github-da ahmoq kolnalotni yashirish
  332. // @description:ve U dzumba Copilot ya vhutsilu kha GitHub
  333. // @description:vi Ẩn Copilot ngu ngốc trên GitHub
  334. // @description:wo Kopilot bu doy waar ci GitHub
  335. // @description:xh Fihla ikopi ye-otionat kwi-git
  336. // @description:yi באַהאַלטן נאַריש קאַפּילאָט אויף גיטהוב
  337. // @description:yo Tọju CAVILOT CABALOT lori Github
  338. // @description:zh 在 GitHub 上隐藏愚蠢的 Copilot
  339. // @description:zh-CN 在 GitHub 上隐藏愚蠢的 Copilot
  340. // @description:zh-HK 在 GitHub 上隱藏愚蠢的 Copilot
  341. // @description:zh-MO 在 GitHub 上隱藏愚蠢的 Copilot
  342. // @description:zh-MY 在 GitHub 上隐藏愚蠢的 Copilot
  343. // @description:zh-SG 在 GitHub 上隐藏愚蠢的 Copilot
  344. // @description:zh-TW 在 GitHub 上隱藏愚蠢的 Copilot
  345. // @description:zu Fihla i-copilot eyisiphukuphuku ku-github
  346. // @author 人民的勤务员 <china.qinwuyuan@gmail.com>
  347. // @namespace https://github.com/ChinaGodMan/UserScripts
  348. // @supportURL https://github.com/ChinaGodMan/UserScripts/issues
  349. // @homepageURL https://github.com/ChinaGodMan/UserScripts
  350. // @license MIT
  351. // @match https://github.com/*
  352. // @icon https://raw.githubusercontent.com/ChinaGodMan/UserScriptsHistory/main/scriptsIcon/github-commit-viewer.png
  353. // @grant none
  354. // @compatible chrome
  355. // @compatible firefox
  356. // @compatible edge
  357. // @compatible opera
  358. // @compatible safari
  359. // @compatible kiwi
  360. // @compatible qq
  361. // @compatible via
  362. // @compatible brave
  363. // @version 2025.5.21.1
  364. // @created 2025-05-19 02:19:24
  365. // ==/UserScript==
  366. /**
  367. * File: github-no-copilot.user.js
  368. * Project: UserScripts
  369. * File Created: 2025/05/19,Monday 02:19:25
  370. * Author: 人民的勤务员@ChinaGodMan (china.qinwuyuan@gmail.com)
  371. * -----
  372. * Last Modified: 2025/05/21,Wednesday 15:53:18
  373. * Modified By: 人民的勤务员@ChinaGodMan (china.qinwuyuan@gmail.com)
  374. * -----
  375. * License: MIT License
  376. * Copyright © 2024 - 2025 ChinaGodMan,Inc
  377. */
  378.  
  379. //! 删除顶部的 Copilot
  380. const FUCK_HEAD_COPILOT = true
  381.  
  382. //! 删除文件右上角的 Copilot
  383. const FUCK_FILE_COPILOT = true
  384.  
  385. //!https://github.com/dashboard 对话框
  386. const style = document.createElement('style')
  387. style.textContent = `
  388. h2.my-2 {
  389. display: none !important;
  390. }
  391. #dashboard > div > div.copilotPreview__container > copilot-dashboard-entrypoint {
  392. display: none !important;
  393. }
  394. `
  395. document.head.appendChild(style)
  396.  
  397. function remove() {
  398. // 无需确认的元素
  399. const selectors = [
  400. //dashboard 同上css
  401. '.copilotPreview__container',
  402.  
  403. //dashboard 同上css
  404. '.copilot-dashboard-entrypoint',
  405.  
  406. // 左侧边栏
  407. 'a[data-analytics-event*="COPILOT"]',
  408.  
  409. // 右侧边栏
  410. 'a[href="/settings/copilot"]',
  411.  
  412. // commits 页面 询问差异 Copilot
  413. 'li[role="menuitem"].prc-ActionList-ActionListItem-uq6I7'
  414.  
  415. ]
  416. selectors.forEach(selector => {
  417. document.querySelectorAll(selector).forEach(element => element.remove())
  418. })
  419. // https://github.com/outslept/userscripts/blob/master/dont-wanna-see-copilot/userscript.js
  420. //! 需要判断的元素
  421. // issue
  422. document.querySelectorAll('div[data-testid="sidebar-section"]').forEach(s => {
  423. if (s.textContent.includes('Development')) s.remove()
  424. })
  425.  
  426. document.querySelectorAll('.flash-messages .flash-warn').forEach(w => {
  427. if (w.textContent.includes('Copilot')) w.remove()
  428. })
  429.  
  430. const m = document.querySelector('.flash-messages')
  431. if (m && !m.children.length) m.remove()
  432.  
  433. // 可自定义开启或者关闭的元素
  434. const ButtonGroup = document.querySelector('#repos-sticky-header [class*=\'ButtonGroup\']')
  435. const CopilotChat = document.querySelector('.AppHeader-CopilotChat')
  436. if (FUCK_FILE_COPILOT && ButtonGroup) ButtonGroup.style.display = 'none'
  437. if (FUCK_HEAD_COPILOT && CopilotChat) CopilotChat.style.display = 'none'
  438.  
  439. }
  440.  
  441. new MutationObserver(remove).observe(document.body, {
  442. childList: true,
  443. subtree: true
  444. })