Auto code viewer for Github (for mobile users)

Auto clicks "View code" on Github repositories. Useful for mobile users.

  1. // ==UserScript==
  2. // @name Auto code viewer for Github (for mobile users)
  3. // @namespace https://myanimelist.net/profile/kyoyatempest
  4. // @match https://github.com/*/*
  5. // @version 1.1
  6. // @author kyoyacchi
  7. // @description Auto clicks "View code" on Github repositories. Useful for mobile users.
  8. // @license gpl-3.0
  9. // @icon https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://github.com&size=64
  10. // ==/UserScript==
  11. window.onload = function () {
  12. let code = document.querySelector(".py-2.px-3.width-full.d-block.btn-link.js-details-target")
  13.  
  14. if (code) {
  15. code.click()
  16. } else return
  17.  
  18. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址