├── .gitattributes ├── .editorconfig ├── README.md ├── github-nopilot.user.css └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css text eol=lf 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_size = 4 6 | indent_style = space 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.css] 11 | indent_size = 2 12 | end_of_line = lf 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # github-nopilot 2 | 3 | [![Install UserCSS](https://img.shields.io/badge/Install-UserCSS-285959.svg)](https://github.com/xt0rted/github-nopilot/raw/refs/heads/main/github-nopilot.user.css) 4 | [![CC--BY--SA--4.0](https://img.shields.io/badge/License-%20CC--BY--SA--4.0%20-blue.svg)](LICENSE) 5 | 6 | Hide Copilot from your GitHub experience. 7 | -------------------------------------------------------------------------------- /github-nopilot.user.css: -------------------------------------------------------------------------------- 1 | /* ==UserStyle== 2 | @name GitHub Nopilot 3 | @namespace xt0rted 4 | @version 1.8.3 5 | @homepageURL https://github.com/xt0rted/github-nopilot 6 | @updateURL https://github.com/xt0rted/github-nopilot/raw/refs/heads/main/github-nopilot.user.css 7 | @license CC-BY-SA-4.0 8 | @author Brian Surowiec (https://github.com/xt0rted) 9 | ==/UserStyle== */ 10 | @-moz-document domain("github.com") { 11 | .AppHeader { 12 | .AppHeader-globalBar { 13 | .AppHeader-globalBar-start { 14 | /* 🍔 menu option */ 15 | nav ul li:has(> a[href="/copilot"]) { 16 | display: none; 17 | } 18 | } 19 | 20 | /* Page header button/dropdown */ 21 | .AppHeader-CopilotChat { 22 | display: none; 23 | } 24 | } 25 | } 26 | 27 | /* Floating button bottom right */ 28 | #copilot-floating-button { 29 | display: none; 30 | } 31 | 32 | /* Your Coplilot link in the user dropdown menu */ 33 | #__primerPortalRoot__ { 34 | div[class*="Dialog__StyledDialog"] { 35 | li[class*="Item__LiBox"]:has(a[href="/github-copilot/signup"]) { 36 | display: none; 37 | } 38 | } 39 | } 40 | 41 | /* Button in the markdown editor menu */ 42 | .ActionBar-item button[id^="copilot-md-menu-anchor-"] { 43 | display: none; 44 | } 45 | 46 | /* PR files tab */ 47 | #files_bucket { 48 | /* Ask Copilot button on PR files tab */ 49 | react-partial[partial-name="copilot-code-chat"] { 50 | display: none; 51 | } 52 | 53 | /* Copilot menu at end of PR file line */ 54 | div[class*="DiffLinesMenu-module__diff-button-container"]:has(button[class*="AskCopilotButton"]) { 55 | display: none; 56 | } 57 | 58 | /* File options popup */ 59 | .dropdown-menu { 60 | span[data-target="copilot-diff-entry.menuItemsSlot"] { 61 | display: none; 62 | } 63 | } 64 | } 65 | 66 | /* Ask Copilot button in file view */ 67 | #repos-sticky-header button[class*="AskCopilotButton"] { 68 | display: none; 69 | } 70 | 71 | /* Copilot section in file actions menu */ 72 | ul[role="menu"] > li { 73 | &[data-component="ActionList.Divider"]:has(+ li [data-testid="copilot-menu-items"]), /* Divider before main element */ 74 | &:has([data-testid="copilot-menu-items"]) /* Main element */ 75 | { 76 | display: none; 77 | } 78 | } 79 | 80 | /* Copilot menu in file view */ 81 | .repository-content { 82 | #copilot-button-positioner { 83 | padding-right: 0; 84 | } 85 | 86 | #copilot-button-container { 87 | display: none; 88 | } 89 | } 90 | 91 | /* Copilot section of main search dropdown */ 92 | .ActionListWrap .ActionList-sectionDivider { 93 | &:has(+ .ActionList-sectionDivider #query-builder-test-result-ask-copilot), /* Divider before main element */ 94 | &:has(#query-builder-test-result-ask-copilot) /* Main element */ 95 | { 96 | display: none; 97 | } 98 | } 99 | 100 | /* Ask about this diff option of file diff dropdown */ 101 | ul[role="menu"] > li[data-component="ActionList.Divider"]:has(+ li svg.octicon-copilot), 102 | ul[role="menu"] > li[data-component="ActionList.Divider"] + li:has(svg.octicon-copilot) { 103 | display: none; 104 | } 105 | 106 | /* Explain error button in actions logs */ 107 | react-partial[partial-name="copilot-actions-chat-button"] { 108 | display: none; 109 | } 110 | 111 | #dashboard { 112 | /* Ask copilot box on the homepage/news feed */ 113 | .copilotPreview__container { 114 | display: none; 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-ShareAlike 4.0 International 2 | 3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not 4 | provide legal services or legal advice. Distribution of Creative Commons public 5 | licenses does not create a lawyer-client or other relationship. Creative Commons 6 | makes its licenses and related information available on an “as-is” basis. 7 | Creative Commons gives no warranties regarding its licenses, any material 8 | licensed under their terms and conditions, or any related information. Creative 9 | Commons disclaims all liability for damages resulting from their use to the 10 | fullest extent possible. Using Creative Commons Public Licenses Creative Commons 11 | public licenses provide a standard set of terms and conditions that creators and 12 | other rights holders may use to share original works of authorship and other 13 | material subject to copyright and certain other rights specified in the public 14 | license below. The following considerations are for informational purposes only, 15 | are not exhaustive, and do not form part of our licenses. Considerations for 16 | licensors: Our public licenses are intended for use by those authorized to give 17 | the public permission to use material in ways otherwise restricted by copyright 18 | and certain other rights. Our licenses are irrevocable. Licensors should read 19 | and understand the terms and conditions of the license they choose before 20 | applying it. Licensors should also secure all rights necessary before applying 21 | our licenses so that the public can reuse the material as expected. Licensors 22 | should clearly mark any material not subject to the license. This includes other 23 | CC-licensed material, or material used under an exception or limitation to 24 | copyright. More considerations for licensors. Considerations for the public: By 25 | using one of our public licenses, a licensor grants the public permission to use 26 | the licensed material under specified terms and conditions. If the licensor’s 27 | permission is not necessary for any reason–for example, because of any 28 | applicable exception or limitation to copyright–then that use is not regulated 29 | by the license. Our licenses grant only permissions under copyright and certain 30 | other rights that a licensor has authority to grant. Use of the licensed 31 | material may still be restricted for other reasons, including because others 32 | have copyright or other rights in the material. A licensor may make special 33 | requests, such as asking that all changes be marked or described. Although not 34 | required by our licenses, you are encouraged to respect those requests where 35 | reasonable. More considerations for the public. 36 | 37 | Creative Commons Attribution-ShareAlike 4.0 International Public License 38 | 39 | By exercising the Licensed Rights (defined below), You accept and agree to be 40 | bound by the terms and conditions of this Creative Commons 41 | Attribution-ShareAlike 4.0 International Public License ("Public License"). To 42 | the extent this Public License may be interpreted as a contract, You are granted 43 | the Licensed Rights in consideration of Your acceptance of these terms and 44 | conditions, and the Licensor grants You such rights in consideration of benefits 45 | the Licensor receives from making the Licensed Material available under these 46 | terms and conditions. 47 | 48 | Section 1 – Definitions. 49 | 50 | a. Adapted Material means material subject to Copyright and Similar Rights that 51 | is derived from or based upon the Licensed Material and in which the Licensed 52 | Material is translated, altered, arranged, transformed, or otherwise modified in 53 | a manner requiring permission under the Copyright and Similar Rights held by the 54 | Licensor. For purposes of this Public License, where the Licensed Material is a 55 | musical work, performance, or sound recording, Adapted Material is always 56 | produced where the Licensed Material is synched in timed relation with a moving 57 | image. 58 | 59 | b. Adapter's License means the license You apply to Your Copyright and Similar 60 | Rights in Your contributions to Adapted Material in accordance with the terms 61 | and conditions of this Public License. 62 | 63 | c. BY-SA Compatible License means a license listed at 64 | creativecommons.org/compatiblelicenses, approved by Creative Commons as 65 | essentially the equivalent of this Public License. 66 | 67 | d. Copyright and Similar Rights means copyright and/or similar rights closely 68 | related to copyright including, without limitation, performance, broadcast, 69 | sound recording, and Sui Generis Database Rights, without regard to how the 70 | rights are labeled or categorized. For purposes of this Public License, the 71 | rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 72 | 73 | e. Effective Technological Measures means those measures that, in the absence of 74 | proper authority, may not be circumvented under laws fulfilling obligations 75 | under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, 76 | and/or similar international agreements. 77 | 78 | f. Exceptions and Limitations means fair use, fair dealing, and/or any other 79 | exception or limitation to Copyright and Similar Rights that applies to Your use 80 | of the Licensed Material. 81 | 82 | g. License Elements means the license attributes listed in the name of a 83 | Creative Commons Public License. The License Elements of this Public License are 84 | Attribution and ShareAlike. 85 | 86 | h. Licensed Material means the artistic or literary work, database, or other 87 | material to which the Licensor applied this Public License. 88 | 89 | i. Licensed Rights means the rights granted to You subject to the terms and 90 | conditions of this Public License, which are limited to all Copyright and 91 | Similar Rights that apply to Your use of the Licensed Material and that the 92 | Licensor has authority to license. 93 | 94 | j. Licensor means the individual(s) or entity(ies) granting rights under this 95 | Public License. 96 | 97 | k. Share means to provide material to the public by any means or process that 98 | requires permission under the Licensed Rights, such as reproduction, public 99 | display, public performance, distribution, dissemination, communication, or 100 | importation, and to make material available to the public including in ways that 101 | members of the public may access the material from a place and at a time 102 | individually chosen by them. 103 | 104 | l. Sui Generis Database Rights means rights other than copyright resulting from 105 | Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 106 | on the legal protection of databases, as amended and/or succeeded, as well as 107 | other essentially equivalent rights anywhere in the world. 108 | 109 | m. You means the individual or entity exercising the Licensed Rights under this 110 | Public License. Your has a corresponding meaning. 111 | 112 | Section 2 – Scope. 113 | 114 | a. License grant. 115 | 116 | 1. Subject to the terms and conditions of this Public License, the Licensor 117 | hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, 118 | irrevocable license to exercise the Licensed Rights in the Licensed Material to: 119 | 120 | A. reproduce and Share the Licensed Material, in whole or in part; and 121 | 122 | B. produce, reproduce, and Share Adapted Material. 123 | 124 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and 125 | Limitations apply to Your use, this Public License does not apply, and You do 126 | not need to comply with its terms and conditions. 127 | 128 | 3. Term. The term of this Public License is specified in Section 6(a). 129 | 130 | 4. Media and formats; technical modifications allowed. The Licensor authorizes 131 | You to exercise the Licensed Rights in all media and formats whether now known 132 | or hereafter created, and to make technical modifications necessary to do so. 133 | The Licensor waives and/or agrees not to assert any right or authority to forbid 134 | You from making technical modifications necessary to exercise the Licensed 135 | Rights, including technical modifications necessary to circumvent Effective 136 | Technological Measures. For purposes of this Public License, simply making 137 | modifications authorized by this Section 2(a)(4) never produces Adapted 138 | Material. 139 | 140 | 5. Downstream recipients. 141 | 142 | A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed 143 | Material automatically receives an offer from the Licensor to exercise the 144 | Licensed Rights under the terms and conditions of this Public License. 145 | 146 | B. Additional offer from the Licensor – Adapted Material. Every recipient of 147 | Adapted Material from You automatically receives an offer from the Licensor to 148 | exercise the Licensed Rights in the Adapted Material under the conditions of the 149 | Adapter’s License You apply. 150 | 151 | C. No downstream restrictions. You may not offer or impose any additional or 152 | different terms or conditions on, or apply any Effective Technological Measures 153 | to, the Licensed Material if doing so restricts exercise of the Licensed Rights 154 | by any recipient of the Licensed Material. 155 | 156 | 6. No endorsement. Nothing in this Public License constitutes or may be 157 | construed as permission to assert or imply that You are, or that Your use of the 158 | Licensed Material is, connected with, or sponsored, endorsed, or granted 159 | official status by, the Licensor or others designated to receive attribution as 160 | provided in Section 3(a)(1)(A)(i). 161 | 162 | b. Other rights. 163 | 164 | 1. Moral rights, such as the right of integrity, are not licensed under this 165 | Public License, nor are publicity, privacy, and/or other similar personality 166 | rights; however, to the extent possible, the Licensor waives and/or agrees not 167 | to assert any such rights held by the Licensor to the limited extent necessary 168 | to allow You to exercise the Licensed Rights, but not otherwise. 169 | 170 | 2. Patent and trademark rights are not licensed under this Public License. 171 | 172 | 3. To the extent possible, the Licensor waives any right to collect royalties 173 | from You for the exercise of the Licensed Rights, whether directly or through a 174 | collecting society under any voluntary or waivable statutory or compulsory 175 | licensing scheme. In all other cases the Licensor expressly reserves any right 176 | to collect such royalties. 177 | 178 | Section 3 – License Conditions. 179 | 180 | Your exercise of the Licensed Rights is expressly made subject to the following 181 | conditions. 182 | 183 | a. Attribution. 184 | 185 | 1. If You Share the Licensed Material (including in modified form), You must: 186 | 187 | A. retain the following if it is supplied by the Licensor with the Licensed 188 | Material: 189 | 190 | i. identification of the creator(s) of the Licensed Material and any others 191 | designated to receive attribution, in any reasonable manner requested by the 192 | Licensor (including by pseudonym if designated); 193 | 194 | ii. a copyright notice; 195 | 196 | iii. a notice that refers to this Public License; 197 | 198 | iv. a notice that refers to the disclaimer of warranties; 199 | 200 | v. a URI or hyperlink to the Licensed Material to the extent reasonably 201 | practicable; 202 | 203 | B. indicate if You modified the Licensed Material and retain an indication of 204 | any previous modifications; and 205 | 206 | C. indicate the Licensed Material is licensed under this Public License, and 207 | include the text of, or the URI or hyperlink to, this Public License. 208 | 209 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner 210 | based on the medium, means, and context in which You Share the Licensed 211 | Material. For example, it may be reasonable to satisfy the conditions by 212 | providing a URI or hyperlink to a resource that includes the required 213 | information. 214 | 215 | 3. If requested by the Licensor, You must remove any of the information required 216 | by Section 3(a)(1)(A) to the extent reasonably practicable. 217 | 218 | b. ShareAlike.In addition to the conditions in Section 3(a), if You Share 219 | Adapted Material You produce, the following conditions also apply. 220 | 221 | 1. The Adapter’s License You apply must be a Creative Commons license with the 222 | same License Elements, this version or later, or a BY-SA Compatible License. 223 | 224 | 2. You must include the text of, or the URI or hyperlink to, the Adapter's 225 | License You apply. You may satisfy this condition in any reasonable manner based 226 | on the medium, means, and context in which You Share Adapted Material. 227 | 228 | 3. You may not offer or impose any additional or different terms or conditions 229 | on, or apply any Effective Technological Measures to, Adapted Material that 230 | restrict exercise of the rights granted under the Adapter's License You apply. 231 | 232 | Section 4 – Sui Generis Database Rights. 233 | 234 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your 235 | use of the Licensed Material: 236 | 237 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, 238 | reuse, reproduce, and Share all or a substantial portion of the contents of the 239 | database; 240 | 241 | b. if You include all or a substantial portion of the database contents in a 242 | database in which You have Sui Generis Database Rights, then the database in 243 | which You have Sui Generis Database Rights (but not its individual contents) is 244 | Adapted Material, including for purposes of Section 3(b); and 245 | 246 | c. You must comply with the conditions in Section 3(a) if You Share all or a 247 | substantial portion of the contents of the database. For the avoidance of 248 | doubt, this Section 4 supplements and does not replace Your obligations under 249 | this Public License where the Licensed Rights include other Copyright and 250 | Similar Rights. 251 | 252 | Section 5 – Disclaimer of Warranties and Limitation of Liability. 253 | 254 | a. Unless otherwise separately undertaken by the Licensor, to the extent 255 | possible, the Licensor offers the Licensed Material as-is and as-available, and 256 | makes no representations or warranties of any kind concerning the Licensed 257 | Material, whether express, implied, statutory, or other. This includes, without 258 | limitation, warranties of title, merchantability, fitness for a particular 259 | purpose, non-infringement, absence of latent or other defects, accuracy, or the 260 | presence or absence of errors, whether or not known or discoverable. Where 261 | disclaimers of warranties are not allowed in full or in part, this disclaimer 262 | may not apply to You. 263 | 264 | b. To the extent possible, in no event will the Licensor be liable to You on any 265 | legal theory (including, without limitation, negligence) or otherwise for any 266 | direct, special, indirect, incidental, consequential, punitive, exemplary, or 267 | other losses, costs, expenses, or damages arising out of this Public License or 268 | use of the Licensed Material, even if the Licensor has been advised of the 269 | possibility of such losses, costs, expenses, or damages. Where a limitation of 270 | liability is not allowed in full or in part, this limitation may not apply to 271 | You. 272 | 273 | c. The disclaimer of warranties and limitation of liability provided above shall 274 | be interpreted in a manner that, to the extent possible, most closely 275 | approximates an absolute disclaimer and waiver of all liability. 276 | 277 | Section 6 – Term and Termination. 278 | 279 | a. This Public License applies for the term of the Copyright and Similar Rights 280 | licensed here. However, if You fail to comply with this Public License, then 281 | Your rights under this Public License terminate automatically. 282 | 283 | b. Where Your right to use the Licensed Material has terminated under Section 284 | 6(a), it reinstates: 285 | 286 | 1. automatically as of the date the violation is cured, provided it is cured 287 | within 30 days of Your discovery of the violation; or 288 | 289 | 2. upon express reinstatement by the Licensor. 290 | 291 | c. For the avoidance of doubt, this Section 6(b) does not affect any right the 292 | Licensor may have to seek remedies for Your violations of this Public License. 293 | 294 | d. For the avoidance of doubt, the Licensor may also offer the Licensed Material 295 | under separate terms or conditions or stop distributing the Licensed Material at 296 | any time; however, doing so will not terminate this Public License. 297 | 298 | e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 299 | 300 | Section 7 – Other Terms and Conditions. 301 | 302 | a. The Licensor shall not be bound by any additional or different terms or 303 | conditions communicated by You unless expressly agreed. 304 | 305 | b. Any arrangements, understandings, or agreements regarding the Licensed 306 | Material not stated herein are separate from and independent of the terms and 307 | conditions of this Public License. 308 | 309 | Section 8 – Interpretation. 310 | 311 | a. For the avoidance of doubt, this Public License does not, and shall not be 312 | interpreted to, reduce, limit, restrict, or impose conditions on any use of the 313 | Licensed Material that could lawfully be made without permission under this 314 | Public License. 315 | 316 | b. To the extent possible, if any provision of this Public License is deemed 317 | unenforceable, it shall be automatically reformed to the minimum extent 318 | necessary to make it enforceable. If the provision cannot be reformed, it shall 319 | be severed from this Public License without affecting the enforceability of the 320 | remaining terms and conditions. 321 | 322 | c. No term or condition of this Public License will be waived and no failure to 323 | comply consented to unless expressly agreed to by the Licensor. 324 | 325 | d. Nothing in this Public License constitutes or may be interpreted as a 326 | limitation upon, or waiver of, any privileges and immunities that apply to the 327 | Licensor or You, including from the legal processes of any jurisdiction or 328 | authority. 329 | 330 | Creative Commons is not a party to its public licenses. Notwithstanding, 331 | Creative Commons may elect to apply one of its public licenses to material it 332 | publishes and in those instances will be considered the “Licensor.” Except for 333 | the limited purpose of indicating that material is shared under a Creative 334 | Commons public license or as otherwise permitted by the Creative Commons 335 | policies published at creativecommons.org/policies, Creative Commons does not 336 | authorize the use of the trademark “Creative Commons” or any other trademark or 337 | logo of Creative Commons without its prior written consent including, without 338 | limitation, in connection with any unauthorized modifications to any of its 339 | public licenses or any other arrangements, understandings, or agreements 340 | concerning use of licensed material. For the avoidance of doubt, this paragraph 341 | does not form part of the public licenses. Creative Commons may be contacted at 342 | creativecommons.org. 343 | --------------------------------------------------------------------------------