Skip to content

Commit

Permalink
update position
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberJe committed Mar 15, 2018
1 parent 1252418 commit e2f2a86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mossad",
"version": "0.1.4",
"version": "0.1.5",
"description": "A mobile rolling performance observation tool",
"main": "src/index.js",
"scripts": {
Expand Down
16 changes: 8 additions & 8 deletions src/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ Object.defineProperty(fpsState, 'fps', {
},
set: function(value) {
fpsEle.innerText = value
if (fpsState.fps > 55) {
fpsEle.style.color = "green"
} else if (fpsState.fps > 30) {
fpsEle.style.color = "yellow"
} else {
fpsEle.style.color = "red"
}
// if (fpsState.fps > 55) {
// fpsEle.style.color = "green"
// } else if (fpsState.fps > 30) {
// fpsEle.style.color = "yellow"
// } else {
// fpsEle.style.color = "red"
// }
this._fps = value
}
})

fpsState.fps = 0

fpsEle.innerText = fpsState.fps
fpsEle.style.cssText = "position: fixed; top: 0; right: 0;z-index: 9999999; width: 25px; height: 25px; background: #f5f5f5; color: #666; line-height: 25px; text-align: center;"
fpsEle.style.cssText = "position: fixed; bottom: 80px; right: 20px;z-index: 9999999; width: 25px; height: 25px; border-radius: 2px; background: #f5f5f5; color: #666; line-height: 25px; text-align: center;"

document.body.appendChild(fpsEle)

Expand Down

0 comments on commit e2f2a86

Please sign in to comment.