|
360 | 360 | // @compatible qq |
361 | 361 | // @compatible via |
362 | 362 | // @compatible brave |
363 | | -// @version 2025.5.19.1 |
| 363 | +// @version 2025.5.21.1 |
364 | 364 | // @created 2025-05-19 02:19:24 |
365 | 365 | // @downloadURL https://raw.githubusercontent.com/ChinaGodMan/UserScripts/main/github-no-copilot/github-no-copilot.user.js |
366 | 366 | // @updateURL https://raw.githubusercontent.com/ChinaGodMan/UserScripts/main/github-no-copilot/github-no-copilot.user.js |
|
371 | 371 | * File Created: 2025/05/19,Monday 02:19:25 |
372 | 372 | * Author: 人民的勤务员@ChinaGodMan (china.qinwuyuan@gmail.com) |
373 | 373 | * ----- |
374 | | - * Last Modified: 2025/05/19,Monday 03:27:16 |
| 374 | + * Last Modified: 2025/05/21,Wednesday 15:53:18 |
375 | 375 | * Modified By: 人民的勤务员@ChinaGodMan (china.qinwuyuan@gmail.com) |
376 | 376 | * ----- |
377 | 377 | * License: MIT License |
@@ -405,12 +405,32 @@ function remove() { |
405 | 405 | //dashboard 同上css |
406 | 406 | '.copilot-dashboard-entrypoint', |
407 | 407 |
|
408 | | - // 侧边栏 |
409 | | - 'a[data-analytics-event*="COPILOT"]' |
| 408 | + // 左侧边栏 |
| 409 | + 'a[data-analytics-event*="COPILOT"]', |
| 410 | + |
| 411 | + // 右侧边栏 |
| 412 | + 'a[href="/settings/copilot"]', |
| 413 | + |
| 414 | + // commits 页面 询问差异 Copilot |
| 415 | + 'li[role="menuitem"].prc-ActionList-ActionListItem-uq6I7' |
| 416 | + |
410 | 417 | ] |
411 | 418 | selectors.forEach(selector => { |
412 | 419 | document.querySelectorAll(selector).forEach(element => element.remove()) |
413 | 420 | }) |
| 421 | + // https://github.com/outslept/userscripts/blob/master/dont-wanna-see-copilot/userscript.js |
| 422 | + //! 需要判断的元素 |
| 423 | + // issue |
| 424 | + document.querySelectorAll('div[data-testid="sidebar-section"]').forEach(s => { |
| 425 | + if (s.textContent.includes('Development')) s.remove() |
| 426 | + }) |
| 427 | + |
| 428 | + document.querySelectorAll('.flash-messages .flash-warn').forEach(w => { |
| 429 | + if (w.textContent.includes('Copilot')) w.remove() |
| 430 | + }) |
| 431 | + |
| 432 | + const m = document.querySelector('.flash-messages') |
| 433 | + if (m && !m.children.length) m.remove() |
414 | 434 |
|
415 | 435 | // 可自定义开启或者关闭的元素 |
416 | 436 | const ButtonGroup = document.querySelector('#repos-sticky-header [class*=\'ButtonGroup\']') |
|
0 commit comments