feat: extended tribe profile
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
b3b23edd17
commit
0059f560b7
16
README.md
16
README.md
|
@ -20,6 +20,22 @@ javascript:
|
|||
$.getScript('https://scripts.tribalwarshelp.com/extended-player-profile.quickbar.js')
|
||||
```
|
||||
|
||||
### Extended tribe profile
|
||||
|
||||
This script adds additional info and actions on a tribe overview.
|
||||
|
||||
![img.png](docs/extended-tribe-profile.png)
|
||||
|
||||
#### Installation
|
||||
|
||||
[User script](https://scripts.tribalwarshelp.com/extended-tribe-profile.user.js)
|
||||
|
||||
Quick bar:
|
||||
```javascript
|
||||
javascript:
|
||||
$.getScript('https://scripts.tribalwarshelp.com/extended-tribe-profile.quickbar.js')
|
||||
```
|
||||
|
||||
### Extended map popup
|
||||
|
||||
This script extends the map popup with additional info.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 452 KiB |
|
@ -168,6 +168,7 @@ class UI {
|
|||
{
|
||||
header: t('Dominance'),
|
||||
value: this.tribe.dominance - (this.latestSnapshot?.dominance ?? 0),
|
||||
customFormat: (v: number) => `${v.toFixed(4)}%`,
|
||||
},
|
||||
{
|
||||
header: t('Members'),
|
||||
|
@ -229,7 +230,11 @@ class UI {
|
|||
<td style="color: #000; background-color: ${this.getStatBgColor(
|
||||
r.value,
|
||||
r.rank
|
||||
)}">${Math.abs(r.value).toLocaleString()}</td>
|
||||
)}">${
|
||||
r.customFormat
|
||||
? r.customFormat(r.value)
|
||||
: Math.abs(r.value).toLocaleString()
|
||||
}</td>
|
||||
</tr>
|
||||
`
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue