Greasy Fork

来自缓存

Greasy Fork is available in English.

GitHub 隐藏 Copilot

在 GitHub 上隐藏愚蠢的 Copilot

// ==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:es-419           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
// @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                人民的勤务员 <[email protected]>
// @namespace             https://github.com/ChinaGodMan/UserScripts
// @supportURL            https://github.com/ChinaGodMan/UserScripts/issues
// @homepageURL           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.19.1
// @created               2025-05-19 02:19:24
// ==/UserScript==
/**
 * File: github-no-copilot.user.js
 * Project: UserScripts
 * File Created: 2025/05/19,Monday 02:19:25
 * Author: 人民的勤务员@ChinaGodMan ([email protected])
 * -----
 * Last Modified: 2025/05/19,Monday 03:27:16
 * Modified By: 人民的勤务员@ChinaGodMan ([email protected])
 * -----
 * 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"]'
    ]
    selectors.forEach(selector => {
        document.querySelectorAll(selector).forEach(element => element.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
})