Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,17 @@
font-size: 1.05rem !important;
}

/* Round the hero image used on index.md (demo.png) */
.VPHero img[src="/demo.png"],
.VPHero .hero img {
border-radius: 12px;
overflow: hidden;
display: block;
max-width: 100%;
object-fit: cover;
border: 1px solid var(--vp-c-border);
}

/* ============================================================
Badges (inline pill labels in content)
============================================================ */
Expand Down
6 changes: 3 additions & 3 deletions apps/elxmoj.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**ELXMOJ** 是基于 [Electron](https://www.electronjs.org/) 构建的小明的OJ桌面客户端。它在原生应用窗口中打开 `www.xmoj.tech`,并**自动注入 XMOJ-Script 用户脚本**,让您无需安装浏览器扩展即可享受脚本的全部增强功能。

- 官网:[https://elxmoj.xmoj-bbs.me](https://elxmoj.xmoj-bbs.me)
- 官网:[https://elxmoj.xmoj-script.uk](https://elxmoj.xmoj-script.uk)
- GitHub:[XMOJ-Script-dev/ELXMOJ](https://github.com/XMOJ-Script-dev/ELXMOJ)

## 主要功能
Expand Down Expand Up @@ -66,8 +66,8 @@ chmod +x ELXMOJ-*-linux-x86_64.AppImage

| 通道 | 脚本来源 | 适用场景 |
|------|---------|---------|
| **正式版**(默认) | `https://xmoj-bbs.me/XMOJ.user.js` | 日常使用,稳定版本 |
| **预览版** | `https://dev.xmoj-bbs.me/XMOJ.user.js` | 体验新功能,可能不稳定 |
| **正式版**(默认) | `https://xmoj-script.uk/XMOJ.user.js` | 日常使用,稳定版本 |
| **预览版** | `https://dev.xmoj-script.uk/XMOJ.user.js` | 体验新功能,可能不稳定 |

### 启动行为

Expand Down
4 changes: 2 additions & 2 deletions apps/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**短消息在线看**是 XMOJ-Script 提供的一个独立网页应用,让您无需安装用户脚本,即可在任意浏览器(包括 **iOS Safari** 和移动端浏览器)中收发 XMOJ 站内短消息。

👉 访问地址:[https://xmoj-bbs.me/messages.html](https://xmoj-bbs.me/messages.html)
👉 访问地址:[https://xmoj-script.uk/messages.html](https://xmoj-script.uk/messages.html)

## 功能特点

Expand All @@ -26,7 +26,7 @@

适用于 **Chrome / Firefox / Edge** 等桌面浏览器。

1. 访问 [https://xmoj-bbs.me/messages.html](https://xmoj-bbs.me/messages.html)
1. 访问 [https://xmoj-script.uk/messages.html](https://xmoj-script.uk/messages.html)
2. 将页面上的"🔖 登录到短消息在线看"链接拖拽到浏览器书签栏
3. 在浏览器中打开 [www.xmoj.tech](https://www.xmoj.tech) 并确保已登录
4. 点击书签栏中的"🔖 登录到短消息在线看"书签
Expand Down
2 changes: 1 addition & 1 deletion community/badges.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 徽章 / Tag

![徽章示例](/badge.png)
<img src="/badge.png" width="300" height="auto" alt="徽章示例" />

**徽章(Badge / Tag)** 是显示在用户名旁的特殊标识,用于标记对社区有特殊贡献或特殊身份的用户。徽章具有自定义背景色、文字色和内容,由管理员手动颁发。

Expand Down
78 changes: 54 additions & 24 deletions guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,53 @@

本页面将引导您完成 XMOJ-Script 的完整安装流程。

::: tip 快速安装(3 步)
::: tip 快速安装
1. 安装 [Tampermonkey](https://www.tampermonkey.net/) 浏览器扩展
2. 在浏览器扩展管理页面开启**开发者模式**(Chrome / Edge 必须)
3. 点击 [安装 XMOJ-Script](https://xmoj-bbs.me/XMOJ.user.js) → 在弹出框中点击「安装」
2. 在浏览器扩展管理页面开启**开发者模式** <span style="color: red;">*</span>
3. 在 Tampermonkey 扩展管理页面开启**允许运行用户脚本** <span style="color: red;">*</span>
4. 点击 [安装 XMOJ-Script](https://xmoj-script.uk/XMOJ.user.js) → 在弹出框中点击「安装」

> <span style="color: red;">*</span> 表示对于 Chrome / Edge 138+ 的用户需要进行的操作
>
> 由于 Google Chrome Manifest V3 政策,Tampermonkey 必须在**开发者模式**下或启用**允许用户脚本**扩展开关才能完整运行用户脚本。**跳过此步骤会导致脚本无法工作。**
>
> 详见 [Tampermonkey 官方说明 → Q209](https://www.tampermonkey.net/faq.php#Q209)
:::

## 第一步:安装 Tampermonkey
## 1 安装 Tampermonkey

XMOJ-Script 是一个 **用户脚本(Userscript)**,需要借助 Tampermonkey 等用户脚本管理器来运行。

请根据您使用的浏览器,点击对应链接安装 Tampermonkey:

| 浏览器 | 安装链接 | 备注 |
|--------|---------|------|
| Google Chrome | [Chrome 应用商店](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) | 推荐 |
| Google Chrome | [Chrome 应用商店](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)([国内镜像](https://chrome.zzzmh.cn/info/dhdgffkkebhmkfjojejmpbldmpobfkfo)) | 推荐 |
| Microsoft Edge | [Edge 加载项商店](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd) | 推荐 |
| Mozilla Firefox | [Firefox 附加组件](https://addons.mozilla.org/firefox/addon/tampermonkey/) | 无需开发者模式 |
| Safari | [App Store](https://apps.apple.com/app/tampermonkey/id1482490089) | 需额外配置 |
| Opera | [Opera 插件商店](https://addons.opera.com/extensions/details/tampermonkey-beta/) | — |

## 第二步:开启浏览器开发者模式
## 2 开启浏览器开发者模式 <span style="color: red;">*</span>

::: warning 重要:Chrome / Edge 必须完成此步骤
由于 Google Chrome Manifest V3 政策,Tampermonkey 必须在**开发者模式**下才能完整运行用户脚本。**跳过此步骤会导致脚本无法工作。**

详见 [Tampermonkey 官方说明 → Q209](https://www.tampermonkey.net/faq.php#Q209)
::: warning <center>Chrome / Edge 138+ 必须完成此步骤</center>
:::

### Google Chrome

1. 地址栏输入 `chrome://extensions` 并按 <kbd>Enter</kbd>
2. 找到页面**右上角**的「**开发者模式**」(Developer mode)开关
3. 将其**打开**(开关变蓝色)
2. 找到页面**右上角**的「**开发者模式**」(Developer mode)开关将其**打开**

![Chrome 开发者模式](https://www.tampermonkey.net/images/faq/dev_mode_chrome.png)
![Chrome 开发者模式](/developer_mode.jpg)

4. 刷新页面后生效
3. 刷新页面后生效

### Microsoft Edge

1. 地址栏输入 `edge://extensions` 并按 <kbd>Enter</kbd>
2. 找到页面**左下角**的「**开发人员模式**」开关
3. 将其**打开**
2. 找到页面**左下角**的「**开发人员模式**」开关将其**打开**

![Edge 开发者模式](https://www.tampermonkey.net/images/faq/dev_mode_edge.png)
![Edge 开发者模式](/developer_mode_edge.jpg)

### Mozilla Firefox

Expand All @@ -59,22 +61,50 @@ Firefox **无需**开启开发者模式,安装 Tampermonkey 后即可直接跳
3. 菜单栏出现「开发」菜单后,点击「**允许未签名的扩展**」
4. 在 Safari 扩展列表中**启用** Tampermonkey

::: details 如何确认开发者模式已生效?
点击浏览器右上角 Tampermonkey 图标 → **控制面板**。若页面正常打开且不显示「扩展无法完整运行」等警告横幅,说明开发者模式已正确配置。
## 3 允许扩展运行用户脚本 <span style="color: red;">*</span>

::: warning <center>Chrome / Edge 138+ 必须完成此步骤</center>
:::

### Google Chrome

1. 地址栏输入 `chrome://extensions` 并按 <kbd>Enter</kbd>
2. 进入 Tempermonkey 扩展「**详情**」页面

![Chrome 扩展详情](/extension_detail.jpg)

3. 勾选「**允许运行用户脚本**」

![Chrome 允许运行用户脚本](/allow_userscript.jpg)

### Microsoft Edge

1. 地址栏输入 `edge://extensions` 并按 <kbd>Enter</kbd>
2. 进入 Tempermonkey 扩展「**详细信息**」页面

![Edge 扩展详细信息](/extension_detail_edge.jpg)

3. 勾选「**允许用户脚本**」

![Edge 允许用户脚本](/allow_userscript_edge.jpg)

::: details 如何确认配置是否生效?
点击浏览器右上角扩展 → Tampermonkey 图标。若弹出页面正常打开且不显示「请启用开发者模式以允许用户脚本注入。点击这里了解如何操作。」等警告内容,说明至此配置已生效。
:::

## 第三步:安装 XMOJ-Script
## 4 安装 XMOJ-Script

<a href="https://xmoj-bbs.me/XMOJ.user.js" style="display:inline-flex;align-items:center;gap:8px;padding:8px 20px;background:#1a7f37;color:#fff;border-radius:6px;text-decoration:none;font-weight:600;font-size:0.95rem;border:1px solid rgba(31,35,40,0.15);">⬇️ 安装 XMOJ-Script(最新版)</a>
<a href="https://xmoj-script.uk/XMOJ.user.js" style="display:inline-flex;align-items:center;gap:8px;padding:8px 20px;background:#1a7f37;color:#fff;border-radius:6px;text-decoration:none;font-weight:600;font-size:0.95rem;border:1px solid rgba(31,35,40,0.15);">最新稳定版(推荐)</a>
<a href="https://dev.xmoj-script.uk/XMOJ.user.js" style="display:inline-flex;align-items:center;gap:8px;padding:8px 20px;background:#3092ad;color:#fff;border-radius:6px;text-decoration:none;font-weight:600;font-size:0.95rem;border:1px solid rgba(31,35,40,0.15);margin-left:12px;">预览版</a>

点击上方按钮后,Tampermonkey 将弹出安装确认页面,确认信息无误后点击「**安装**」即可。
点击上方其中一个按钮后,Tampermonkey 将弹出脚本安装确认页面,确认信息无误后点击「**安装**」即可。

::: info 备用安装渠道
::: info 备用最新版安装渠道
- [ScriptCat 镜像站](https://scriptcat.org/zh-CN/script-show-page/1500/):国内访问更快
- [GitHub Releases](https://github.com/XMOJ-Script-dev/XMOJ-Script/releases/latest):手动下载 `XMOJ.user.js` 后拖入 Tampermonkey 控制面板
:::

## 第四步:验证安装
## 5 验证安装

1. 打开 [www.xmoj.tech](https://www.xmoj.tech)
2. 若页面样式明显变化(导航栏更新、Bootstrap 风格按钮),说明脚本已运行
Expand Down
Binary file added public/allow_userscript.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/allow_userscript_edge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/developer_mode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/developer_mode_edge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/extension_detail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/extension_detail_edge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading