Greasy Fork镜像自动勾选"对编辑器启用语法高亮"

Greasy Fork镜像发布、更新脚本时自动勾选"对编辑器启用语法高亮"

  1. // ==UserScript==
  2. // @name Greasy Fork镜像自动勾选"对编辑器启用语法高亮"
  3. // @description Greasy Fork镜像发布、更新脚本时自动勾选"对编辑器启用语法高亮"
  4. // @namespace https://github.com/linkwanggo
  5. // @version 1.0.0
  6. // @author linkwanggo
  7. // @copyright 2023, linkwanggo (https://github.com/linkwanggo)
  8. // @match *://gf.qytechs.cn/*/*versions/new
  9. // @icon https://gf.qytechs.cn/vite/assets/blacklogo16.bc64b9f7.png
  10. // @compatible chrome
  11. // @compatible firefox
  12. // @compatible edge
  13. // @license MIT
  14. // @run-at document-end
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19. function clickEnableSourceEditorCode() {
  20. try {
  21. const aceEditor = document.querySelector('#ace-editor')
  22. if (!aceEditor) {
  23. document.querySelector('#enable-source-editor-code').click()
  24. }
  25. } catch (e) {
  26. console.error(e)
  27. }
  28. }
  29. window.setTimeout(clickEnableSourceEditorCode, 500)
  30. })();

QingJ © 2025

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