GitHubHideDesktop

hide "Open in GitHub Desktop" button

当前为 2020-06-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @author gaojr
  3. // @namespace https://github.com/gaojr/scripts-styles
  4. // @name:CN-zh_cn GitHub隐藏Desktop按钮
  5. // @name GitHubHideDesktop
  6. // @version 0.6
  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
  11. // @grant none
  12. // @connect github.com
  13. // @icon https://github.githubassets.com/pinned-octocat.svg
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. let func = () => {
  18. // 删除仓库页的 "Open in Desktop"
  19. removeIt('.get-repo-modal .mt-2 .tooltipped.js-remove-unless-platform', true);
  20. // 删除文件页的 "Open this file in GitHub Desktop"
  21. removeIt('.btn-octicon.tooltipped', true);
  22. };
  23. addToFuncMap('github-hide-desktop', func);
  24. })();