# 精装 - 牛津高阶双解第10版完美版（OALDPE）

**URL:** <https://forum.freemdict.com/t/topic/30466>\
**Category:** 词典装饰排版交流分享\
**Tags:** 英汉, mdx, oald, oxford, ﻿英语\
**Created:** [2024 年7 月 29 日 15:02 UTC](https://forum.freemdict.com/t/topic/30466 "2024-07-29T15:02:46Z")\
**Posts on this page:** 1\
**Showing post:** 990

<div class="post-metadata">

作者： ![loichyan](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/loichyan/32/83834_2.png) [@loichyan](https://forum.freemdict.com/u/loichyan)\
发布日期： [2025 年1 月 15 日 11:15 UTC](https://forum.freemdict.com/t/topic/30466/990 "2025-01-15T11:15:00Z")

</div>

@Hazuki 发现了一个非常诡异的 bug：欧路词典在安卓系统上不能正确的设置黑暗模式，iOS 正常。我自己调试了一下，发现是 jQuery 因为不明原因导致 `$("body")` 选中了一个 `class` 是 `expDiv` 的 `div` 元素，进而无法修改 `body` 的 `data-theme` 为 `dark`。不知道是不是被欧路词典内置的 jQuery 重载了？

然后，这样 patch 一下就能正确设置：

```patch
diff --git a/oaldpe-old.js b/oaldpe.js
index c893575..f4918da 100755
--- a/oaldpe-old.js
+++ b/oaldpe.js
@@ -1182,7 +1182,7 @@ function main() {
             }
 
             // Set the theme based on the body's class
- const setEudicTheme = () => $oaldpe.attr('data-theme', $('body').is('.black, .night') ? 'dark' : 'light');
+ const setEudicTheme = () => $oaldpe.attr('data-theme', $(document.body).is('.black, .night') ? 'dark' : 'light');
             setEudicTheme(); // Initial check
             new MutationObserver((mutationsList) => {
                 mutationsList.forEach((mutation) => {

```

在 `oaldpe.js` 的第 1185 行。

一些环境信息：

- OALDPE：20250110
- 欧路词典：10.0.2
- 系统：OneUI 6.1.1, Android 14

---

_[View the full topic](https://forum.freemdict.com/t/topic/30466)._
