Skip to content

Add Tampermonkey userscript for SCAU graduate evaluation form auto-fill#1

Draft
jiefing with Copilot wants to merge 5 commits into
mainfrom
copilot/add-tampermonkey-script
Draft

Add Tampermonkey userscript for SCAU graduate evaluation form auto-fill#1
jiefing with Copilot wants to merge 5 commits into
mainfrom
copilot/add-tampermonkey-script

Conversation

Copilot AI commented Jan 6, 2026

Copy link
Copy Markdown

Implements a Tampermonkey userscript to automatically fill evaluation forms in the South China Agricultural University graduate education management system.

Implementation

  • scau-grad-auto-fill.user.js (261 lines)
    • Complete Tampermonkey metadata with bilingual support (中文/English)
    • Auto-update URLs pointing to GitHub raw content
    • Page detection via keyword matching on body text and title
    • Form filling logic for radio buttons, select dropdowns, textareas, and text inputs
    • Floating gradient-styled control button (fixed position, top-right)
    • Configurable CONFIG object for scores, delays, and comment templates

Key Technical Decisions

  • No auto-submit by default: Requires manual submission after review to prevent accidental form submission
  • Placeholder null-safety: Defaults empty placeholder to avoid runtime errors on inputs without placeholder attribute
  • Submit button detection: Uses Array.from().find() pattern instead of invalid :contains() CSS pseudo-class
  • Event dispatching: Triggers both input and change events for framework compatibility

Example Usage

// User clicks floating button, script executes:
const CONFIG = {
    defaultScore: 5,           // Highest score selection
    fillDelay: 500,            // 500ms between field groups
    autoSubmit: false,         // Manual submission required
    textComments: [/* ... */]  // Random comment selection
};

Security

  • CodeQL scan: 0 vulnerabilities
  • @grant none - no special permissions required
  • Runs only on *.scau.edu.cn domains via @match directives

Documentation

  • Installation guide for Chrome/Firefox/Edge/Safari
  • Configuration examples and safety warnings
  • MIT license, CHANGELOG, and CONTRIBUTING guide
Original prompt

我想发布一个Tampermonkey的脚本


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 6, 2026 09:27
Co-authored-by: jiefing <90898679+jiefing@users.noreply.github.com>
Co-authored-by: jiefing <90898679+jiefing@users.noreply.github.com>
Co-authored-by: jiefing <90898679+jiefing@users.noreply.github.com>
Co-authored-by: jiefing <90898679+jiefing@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Tampermonkey script for user automation Add Tampermonkey userscript for SCAU graduate evaluation form auto-fill Jan 6, 2026
Copilot AI requested a review from jiefing January 6, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants