Conversation
Update .github/workflows/code-check.yml: remove the actions/setup-node cache setting and replace `npm ci` with `npm install` for the Install dependencies step. This changes how dependencies are installed in the code-check job, accommodating environments where `npm ci` or the previous cache configuration was problematic.
There was a problem hiding this comment.
Pull request overview
Introduces an Electron-based launcher (“ELXMOJ”) that loads https://www.xmoj.tech, injects the bundled/managed XMOJ.user.js, and adds update/self-check + settings persistence.
Changes:
- Adds main/preload process implementation for userscript injection, IPC bridges, update checks, and self-check tooling.
- Adds settings UI (HTML/JS) and filesystem-backed persistence for app settings + a managed userscript copy.
- Adds project scaffolding: ESLint config, npm scripts, and GitHub Actions workflows for checks and release builds.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/main.js |
Electron app bootstrap, windows/menu, IPC handlers, update/self-check orchestration |
src/preload.js |
Userscript injection pipeline, GM_* shims, @require loader, renderer↔main bridge exposure |
src/updater.js |
Download helper + userscript metadata parsing and version comparison |
src/storage.js |
Persists settings + manages the userscript file under Electron userData |
src/settings.html |
Settings window UI |
src/settings.js |
Settings window logic and IPC calls |
package.json |
App metadata, scripts, dev dependencies, electron-builder config |
eslint.config.js |
ESLint flat config for src JS |
README.md |
Usage/build/check documentation |
.github/workflows/code-check.yml |
CI for lint + syntax checks |
.github/workflows/release-build.yml |
Multi-OS build + release workflow |
.gitignore |
Basic ignore rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Introduces an Electron-based launcher (“ELXMOJ”) that loads https://www.xmoj.tech, injects the bundled/managed XMOJ.user.js, and adds update/self-check + persistent settings to support an alpha release.
Changes:
- Added Electron main/preload implementation for userscript injection, GM_* shims, update checking, and self-check.
- Added settings persistence + settings UI (HTML/JS) for channel selection and startup behaviors.
- Added project tooling: ESLint config, packaging scripts (electron-builder), and GitHub Actions workflows; updated README.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.js | Electron main process: window creation, menus, IPC handlers, updater + self-check orchestration |
| src/preload.js | Preload bridge: injection pipeline, GM polyfills, @require loading, cookie/credential shims, ELXMOJ API exposure |
| src/updater.js | Update channel URLs + script download + metadata/version parsing helpers |
| src/storage.js | Settings + managed userscript persistence under Electron userData |
| src/settings.html | Settings window UI |
| src/settings.js | Settings window logic (load/save/update/self-check actions) |
| package.json | App metadata, scripts, devDependencies, electron-builder config |
| eslint.config.js | ESLint flat config for src/ |
| README.md | Usage/docs for running, self-check, CI, packaging, persistence |
| .gitignore | Added ignore rules (currently only node_modules/) |
| .github/workflows/code-check.yml | CI lint/syntax check workflow |
| .github/workflows/release-build.yml | Tag/manual release build workflow with artifact upload + GitHub Release publish |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Make small cleanups in src/preload.js: remove the returned value from the cookie shim setter so the nativeSet result is not propagated; simplify the double-quote regex literal in the markdown fallback; and drop unused parameters from GM_registerMenuCommand (Electron provides menu commands, so the page-level registration is left as a no-op). These are minor refactors to tidy behavior and avoid unnecessary return/unused-arg usage.
Add application icon assets (app.ico, app.png, favicon.ico) and include build/icons in packaged files. Configure platform-specific icons in package.json for Windows, macOS, and Linux. Update src/main.js to compute APP_ICON_PATH based on platform and set it on created BrowserWindow instances so the app windows use the provided icons.
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial (“alpha”) Electron-based launcher for XMOJ (“ELXMOJ”), including userscript injection, update checking, a settings UI, and CI/build packaging configuration.
Changes:
- Add Electron main/preload processes to load
https://www.xmoj.tech, injectXMOJ.user.js, and provide update/self-check features. - Add persistent settings + a dedicated settings window (HTML/JS) to manage update channel and startup behavior.
- Add project scaffolding: ESLint config, package/build scripts, GitHub Actions workflows, and application icons.
Reviewed changes
Copilot reviewed 11 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/main.js |
Main process app bootstrap, menu, settings IPC, updater/self-check logic, and GM_* IPC plumbing. |
src/preload.js |
Userscript injection pipeline, GM polyfills, @require loader, and renderer bridge exposure. |
src/updater.js |
Download + metadata parsing + version comparison helpers for userscript updating. |
src/storage.js |
Persist settings and managed userscript under Electron userData. |
src/settings.html |
Settings window UI markup/styles. |
src/settings.js |
Settings window logic via window.ELXMOJ bridge. |
package.json |
Electron/electron-builder scripts and build configuration. |
eslint.config.js |
ESLint flat config for src/**/*.js. |
README.md |
Documentation for running, self-check, CI, packaging, and persistence locations. |
.github/workflows/code-check.yml |
CI lint + syntax checks on push/PR. |
.github/workflows/release-build.yml |
Cross-platform build + artifact upload + tag-based GitHub Release publish. |
.gitignore |
Ignore node_modules/. |
build/icons/app.png |
App icon asset. |
build/icons/app.ico |
App icon asset. |
favicon.ico |
Favicon asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
你说的是构建发布还是别的 |
|
为什么按了回车以后默认是 Close PR…… |
现在是从官网下载脚本执行 |
那应该用submodule 吧 |
Yes, but this is easy |
你说这个repo加入submodule? |
在这个repo加入submodule |
|
ok |
Introduce App update support and synchronize user-script debug/channel state between the main window and settings. Adds app update URL template, platform mapping, helpers to detect latest release from latest.json/latest.yml or GitHub releases, and functions to build/download update URLs. Exposes new IPC handlers and preload APIs for app update info, opening update page, and reading/writing script debug mode; settings UI now displays app version/update info and includes a "Download latest App" button. Also syncs channel with the script's debug-mode stored in the web app, adds CmdOrCtrl+, accelerator for Settings, updates startup self-check to sync channel, and adds repository/homepage metadata to package.json. README updated with app download update source.
|
@boomzero submodule你做吧我下载不下来 |
ok |
Emm? |
Change app update flow to use GitHub Releases download URLs and simplify updater logic. README updated to show the new Releases URL format. main.js: replaced custom app update endpoints with a GitHub Releases template, removed HTTPS-based version discovery and related helpers (download/parsing/detection), simplified getAppUpdateUrl to build a direct Releases download link using app.getVersion(), adjusted platform extension mapping (default -> zip), and removed unused https import. IPC handlers now return/open the direct download URL only. preload.js / settings.*: removed exposure and UI elements that displayed remote latest-version details (getAppUpdateInfo, appVersionInfo, appUpdateAdvice) and updated settings.js to only show the computed download URL. This simplifies update behavior but removes automatic latest-version checks and the getAppUpdateInfo API; callers should use getAppUpdateUrl or rely on GitHub Releases tags.
Remove getUpdateSystemName and getVersionSuffix from src/main.js. These helpers (platform name mapping and semver prerelease normalization) were unused/duplicative and have been deleted to simplify the update-related code. getPlatformPackageExtension and getAppUpdateUrl remain unchanged, so there should be no behavioral change to update URL construction.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 16 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
感觉 |
|
bushi我还以为是覆写 |
|
不然捏你觉得还能是什么,不然每次写完script一个功能就得给elxmoj写一下多麻烦
Message ID: ***@***.***>
|
|
👍 |

please do not accept copilot suggestions since they often break the fragile code
the app runs on a fragile base which breaks easily due to the fact that I transplant the script through translation