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