Changes

Jump to navigation Jump to search
→‎Script: update for unified stable/beta compatibility table
Line 27: Line 27:  
This tiny script generates the template call when run from the parent page.
 
This tiny script generates the template call when run from the parent page.
 
<source lang="javascript">
 
<source lang="javascript">
var entries = $("#mod-list .mod:not([data-status='abandoned'], [data-status='obsolete'])");
+
var entries = $("#mod-list .mod:not([data-beta-status='abandoned'], [data-beta-status='obsolete'])");
var ok = entries.filter("[data-status='ok'], [data-status='optional']").length;
+
var ok = entries.filter("[data-beta-status='ok'], [data-beta-status='optional']").length;
var workaround = entries.filter("[data-status='workaround'], [data-status='unofficial']").length;
+
var workaround = entries.filter("[data-beta-status='workaround'], [data-beta-status='unofficial']").length;
var soon = entries.filter("[data-status='broken'][data-github], [data-status='broken'][data-custom-source]").length;
+
var soon = entries.filter("[data-beta-status='broken'][data-github], [data-beta-status='broken'][data-custom-source]").length;
var broken = entries.filter("[data-status='broken']:not([data-github], [data-custom-source])").length;
+
var broken = entries.filter("[data-beta-status='broken']:not([data-github], [data-custom-source])").length;
 
var total = ok + workaround + soon + broken;
 
var total = ok + workaround + soon + broken;
    
if (total != entries.length) {
 
if (total != entries.length) {
   var unknown = entries.filter(":not([data-status='ok'], [data-status='optional'], [data-status='workaround'], [data-status='obsolete'], [data-status='broken'], [data-status='abandoned'])");
+
   var unknown = entries.filter(":not([data-beta-status='ok'], [data-beta-status='optional'], [data-beta-status='workaround'], [data-beta-status='obsolete'], [data-beta-status='broken'], [data-beta-status='abandoned'])");
 
   console.log("found entries with unknown status:", unknown);
 
   console.log("found entries with unknown status:", unknown);
 
   throw 'script failed';
 
   throw 'script failed';
translators
8,403

edits

Navigation menu