diff --git a/README.md b/README.md index da89c1a..abf74d0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index cadf640..778a16d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eruda-monitor", - "version": "1.0.0", + "version": "1.0.1", "main": "eruda-monitor.js", "browserslist": [ "> 0.25%", @@ -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", diff --git a/src/index.js b/src/index.js index 12829ed..75b870f 100644 --- a/src/index.js +++ b/src/index.js @@ -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 @@ -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) -} \ No newline at end of file