Skip to content

Commit

Permalink
release: v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Jul 10, 2024
1 parent 01aab1b commit 893c6f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# eruda-monitor

Eruda plugin for xxx.
Eruda plugin for fps and memory.

## Demo

Browse it on your phone:
[https://eruda.liriliri.io/](https://eruda.liriliri.io/)
[https://eruda.liriliri.io/?plugin=monitor](https://eruda.liriliri.io/?plugin=monitor)

## Install

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eruda-monitor",
"version": "1.0.0",
"version": "1.0.1",
"main": "eruda-monitor.js",
"browserslist": [
"> 0.25%",
Expand Down Expand Up @@ -29,7 +29,7 @@
"autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2",
"css-loader": "^3.4.2",
"eruda": "^2.11.3",
"eruda": "^3.1.0",
"es5": "^1.0.0",
"eslint": "^8.36.0",
"handlebars": "^4.7.7",
Expand Down
20 changes: 1 addition & 19 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = function(eruda) {
return eruda.util.evalCss.getCurTheme().accent
}
_getTheme() {
return isDarkTheme(eruda.get().config.get('theme')) ? 'dark' : 'light'
return eruda.util.isDarkTheme() ? 'dark' : 'light'
}
_initFps(el) {
let frames = 0
Expand Down Expand Up @@ -114,21 +114,3 @@ module.exports = function(eruda) {

return new Monitor()
}

const darkThemes = [
'Dark',
'Material Oceanic',
'Material Darker',
'Material Palenight',
'Material Deep Ocean',
'Monokai Pro',
'Dracula',
'Arc Dark',
'Atom One Dark',
'Solarized Dark',
'Night Owl',
]

function isDarkTheme(theme) {
return contain(darkThemes, theme)
}

0 comments on commit 893c6f9

Please sign in to comment.