mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 12:40:00 +00:00
build browser scripts
This commit is contained in:
parent
962f8d6442
commit
bff1b50e42
3 changed files with 2836 additions and 2820 deletions
File diff suppressed because one or more lines are too long
5542
browser/browser.js
5542
browser/browser.js
File diff suppressed because it is too large
Load diff
|
|
@ -122,6 +122,10 @@ module.exports =
|
||||||
|
|
||||||
newUser
|
newUser
|
||||||
|
|
||||||
|
percent: (x,y) ->
|
||||||
|
x=1 if x==0
|
||||||
|
Math.round(x/y*100)
|
||||||
|
|
||||||
###
|
###
|
||||||
This allows you to set object properties by dot-path. Eg, you can run pathSet('stats.hp',50,user) which is the same as
|
This allows you to set object properties by dot-path. Eg, you can run pathSet('stats.hp',50,user) which is the same as
|
||||||
user.stats.hp = 50. This is useful because in our habitrpg-shared functions we're returning changesets as {path:value},
|
user.stats.hp = 50. This is useful because in our habitrpg-shared functions we're returning changesets as {path:value},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue