AcWing Better++

在AcWing Better!的基础上支持多设备同时登录功能(改自北极小狐的AcWing Better!)

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
CN059
Daily installs
0
Total installs
16
Ratings
0 0 0
Version
3.29.1
Created
2025-03-27
Updated
2025-03-27
Size
42.1 KB
License
MIT
Applies to

AcWing Better++ 油猴脚本修改说明

✨ 主要修改内容

1. SessionID 双向绑定功能

  • 自动填充:设置面板打开时会自动从cookie中读取sessionid并填充到输入框
  • 优先级:优先使用cookie中的值,没有则使用GM存储的值
  • 实时保存:点击保存时会同时更新GM存储和cookie中的sessionid
  • 有效期:cookie设置为30天有效期

2. 登录状态检测优化

  • 智能检测:通过检查页面是否存在登录按钮判断用户是否已登录
  • 自动提醒:当检测到未登录或缺少sessionid时显示美观的通知

3. 移除自动更新功能

  • 精简代码:移除了所有与自动更新相关的代码和元数据
  • 手动更新:用户需要手动检查脚本更新

4. 其他改进

  • 错误处理:防止重复显示通知
  • UI优化:改进了设置面板的sessionid输入区域样式
  • 代码整理:优化了相关函数的结构和注释

🔧 功能说明

功能 描述
SessionID管理 支持在设置面板查看和修改sessionid,自动同步到cookie
登录状态检测 自动检测用户登录状态并在需要时提示
设置保存 所有设置(包括sessionid)一键保存并立即生效
通知系统 美观的非阻塞式通知,5秒后自动消失

⚙️ 技术细节

  • Cookie操作:使用标准的document.cookieAPI进行操作
  • 数据存储:同时使用GM存储和cookie确保可靠性
  • 事件处理:完善的错误处理和用户交互逻辑
  • UI/UX:保持原有设计风格的同时增强可用性

注意:使用前请确保已安装最新版的Tampermonkey或Violentmonkey