Greasy Fork is available in English.

C语言开发环境美化(中国大学MOOC)

为按钮增加解释性文字

  1. // ==UserScript==
  2. // @name C语言开发环境美化(中国大学MOOC)
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2.2
  5. // @description 为按钮增加解释性文字
  6. // @author AN drew
  7. // @match http://clin.icourse163.org/
  8. // @match http://59.111.100.189/
  9. // @require https://lib.baomitu.com/jquery/3.5.0/jquery.min.js
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. $("head").append('<link rel="shortcut icon" href="//edu-image.nosdn.127.net/32a8dd2a-b9aa-4ec9-abd5-66cd8751befb.png?imageView&amp;quality=100">')
  16.  
  17. var map = new Map();
  18. map.set("format_align_left"," 代码格式化");
  19. map.set("help"," 帮助");
  20. map.set("open_in_browser"," 上传代码");
  21. map.set("file_download","下载当前代码");
  22. map.set("play_arrow","运行");
  23. map.set("bug_report","调试");
  24. map.set("brightness_7"," 切换日间/夜间模式");
  25. map.set("brightness_2"," 切换日间/夜间模式");
  26.  
  27. $(".material-icons").each(function(){
  28. $(this).after($('<span>'+map.get($(this).text())+'</span>'))
  29. })
  30.  
  31. })();