Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

考虑监测一下是否接通电源? #60

Closed
imba-tjd opened this issue Jul 8, 2019 · 2 comments
Closed

考虑监测一下是否接通电源? #60

imba-tjd opened this issue Jul 8, 2019 · 2 comments

Comments

@imba-tjd
Copy link

imba-tjd commented Jul 8, 2019

RT。笔记本,正常情况下占点CPU就算了。但如果没有接通电源还大量占用就很伤了。
或者加个选项,允许控制是否在未接通电源时禁用效果?

@hustcc
Copy link
Owner

hustcc commented Jul 8, 2019

怎么获取是否接入电源?

@imba-tjd
Copy link
Author

imba-tjd commented Jul 8, 2019

我错了😂。我是之前看到FF的WebRender能检测只接通电源时使用,现在想起来它用的不是JS的API


其实我现在发现是可以获取的,不过FF不支持:https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery

@imba-tjd imba-tjd closed this as completed Jul 8, 2019
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

No branches or pull requests

2 participants