Modding:Mod compatibility/barchart: Difference between revisions
Appearance
imported>Pathoschild create page |
imported>Pathoschild + script |
||
| Line 24: | Line 24: | ||
}} | }} | ||
</pre> | </pre> | ||
==Script== | |||
This tiny script generates the template call when run from the parent page. | |||
<source lang="javascript"> | |||
var ok = $("#mod-list tr[data-status='ok']").length; | |||
var workaround = $("#mod-list tr[data-status='workaround']").length; | |||
var soon = $("#mod-list tr[data-status='soon']").length; | |||
var broken = $("#mod-list tr[data-status='broken']").length; | |||
` | |||
{{/barchart | |||
|ok = ${ok} | |||
|workaround = ${workaround} | |||
|soon = ${soon} | |||
|broken = ${broken} | |||
}} | |||
` | |||
</source> | |||
[[Category:Modding]]</noinclude> | [[Category:Modding]]</noinclude> | ||
Revision as of 00:46, 19 July 2017
| {{{ok}}}% are compatible. | |
| {{{workaround}}}% can be replaced with a working alternative. | |
| {{{soon}}}% have an update coming soon. | |
| {{{broken}}}% are currently broken (many due to Stardew Valley 1.1 or 1.2) and not open-source. Some of these may be updated by their authors. |
Usage
List the percentage values for each group:
{{/barchart
|ok = 52
|workaround = 23
|soon = 10
|broken = 15
}}
Script
This tiny script generates the template call when run from the parent page.
var ok = $("#mod-list tr[data-status='ok']").length;
var workaround = $("#mod-list tr[data-status='workaround']").length;
var soon = $("#mod-list tr[data-status='soon']").length;
var broken = $("#mod-list tr[data-status='broken']").length;
`
{{/barchart
|ok = ${ok}
|workaround = ${workaround}
|soon = ${soon}
|broken = ${broken}
}}
`