mp-darkmode 1.0.7 → 1.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,16 @@ Darkmode.run(document.body.querySelectorAll('*'), {
59
59
 
60
60
  More detailed usage can refer to [API](./doc/en/API.md).
61
61
 
62
+ ## Plugins
63
+
64
+ Plugins are supported since `v1.1.0`. Custom actions can be performed during transformation, such as filtering DOM attributes. How to use the plugin is as follows:
65
+
66
+ ```javascript
67
+ Darkmode.extend([pluginA, pluginB, pluginC]);
68
+ ```
69
+
70
+ If you want to write your own Dark Mode plugin, you can refer to [here](./doc/en/plugins.md)。
71
+
62
72
  ## Contribution
63
73
 
64
74
  The algorithm is constantly updated and optimized. If you have a good idea, you can fork and submit your code. For specific development, please refer to [Development Guide](./doc/en/develop.md).
package/README_CN.md CHANGED
@@ -59,6 +59,16 @@ Darkmode.run(document.body.querySelectorAll('*'), {
59
59
 
60
60
  更多详细用法可参考[API](./doc/cn/API.md)。
61
61
 
62
+ ## 插件
63
+
64
+ 从 `v1.1.0` 开始支持插件,可以在转换过程中进行自定义操作,比如过滤 DOM 属性。插件的使用方法如下:
65
+
66
+ ```javascript
67
+ Darkmode.extend([pluginA, pluginB, pluginC]);
68
+ ```
69
+
70
+ 如果你想编写自己的 Dark Mode 插件,可以参考[这里](./doc/cn/plugins.md)。
71
+
62
72
  ## 处理原则
63
73
 
64
74
  详见[图文富文本内容 Dark Mode 处理原则](./doc/cn/principle.md)。