GitHubHideDesktop

hide "Open in GitHub Desktop" button

当前为 2019-12-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @author gaojr
  3. // @namespace https://github.com/gaojr/tampermonkey-scripts
  4. // @name:CN-zh_cn GitHub隐藏Desktop按钮
  5. // @name GitHubHideDesktop
  6. // @version 0.2
  7. // @description hide "Open in GitHub Desktop" button
  8. // @license MIT
  9. // @match https://github.com/*
  10. // @require https://greasyfork.org/scripts/393085-commonsutil/code/CommonsUtil.js?version=754478
  11. // @grant none
  12. // @connect github.com
  13. // @icon https://github.githubassets.com/pinned-octocat.svg
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. window.onload = function () {
  18. console.log('github-hide-desktop start!');
  19. // 删除仓库页的 "Open in Desktop"
  20. removeIt('.get-repo-modal-options .mt-2 .tooltipped.js-get-repo', true);
  21. // 删除文件页的 "Open this file in GitHub Desktop"
  22. removeIt('.btn-octicon.tooltipped', true);
  23. console.log('github-hide-desktop end!');
  24. }
  25. })();