BIT-乐学-修改侧边栏课程-GUI

修改侧边栏显示的课程

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
YDX-2147483647
Daily installs
0
Total installs
12
Ratings
0 0 0
Version
1.0.0
Created
2024-03-02
Updated
2024-10-10
Size
13 KB
License
GPL-3.0-or-later
Applies to

BIT-乐学-修改侧边栏课程-GUI

北京理工大学的乐学(Moodle)的侧边栏好像是按某种规则挑选出最多 10 个课程。然而它并不能完全猜中,还不时更新,导致每次更新都要改。

这段脚本可以修改侧边栏显示的课程。

介绍

第一次使用会出现弹窗,在弹窗中拖放各个课程,来决定是否在侧边栏显示,以及显示顺序。单击“完成”以保存更改。

BIT-乐学-修改侧边栏课程-GUI

在脚本管理器(如篡改猴)的菜单中可以找到“更新课程并修改侧边栏”“仅修改侧边栏”两个选项。

  • 更新课程并修改侧边栏”将发送网络请求并获取最新的课程情况,列在“显示的课程”一栏;
  • 仅修改侧边栏”则从本地篡改猴储存中获取课程情况。

此外还可在弹窗界面编辑课程显示效果

  • 名称:双击格子,直接修改,或者粘贴文本(会自动去除换行和格式);
  • 图标:双击课程名称前的图标,可直接编辑。这是FontAwesome v4 的图标名称,乐学原本为graduation-cap,具体请参考 Font Awesome IconsFont Awesome 中文网

完成后请按Enter或者单击旁边空白处来退出编辑模式。

兼容性

这段脚本与“BIT-乐学-修改侧边栏课程”矛盾,同时启用时效果不确定。

  • 此脚本的操作方式远比无GUI版直观,直接拖动即可;而且能拉取全部课程列表,方便每学期更新。
  • 无GUI版是原初版本,功能已经全面落后,除了代码简洁外基本没有优势。
  • 网上新增课程后,目前两脚本设计了不同的默认行为。此脚本会在用户点击“更新课程并修改侧边栏”后,将新课插入“隐藏的课程”列表开头,并用红色粗体标识;无GUI版则不作为,无论网上原本显示与否,都保持原样。

欢迎有志之士前往 YDX-2147483647/BIT-enhanced 帮忙合并两段脚本。