View Issue Details

IDProjectCategoryView StatusLast Update
0001921HTML & PERLFeature Request - Interfacepublic2011-04-19 11:44
Reporteranidb_bug_reporter Assigned ToDerIdiot  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0001921: Use ABBR tags for episode type abbreviations
DescriptionFor a long time I had used anidb without knowing what the "S" or any other episode prefix indicated. Trying to document Notifications on the wiki, I learned via IRC that "S" == "Special" (eg a bonus ep). From there I was able to track down a few more codes buried in the wiki.

... and then I forgot ...

Fortunately, I remembered that these codes were from the wiki and with some more digging was able to re-locate that information; however, what is missing is direct association without having to try to locate the information on the wiki.
Additional InformationGiven the codes are abbreviations (and rather than wait until I forget again), I have created a greasemonkey script to wrap the prefixes with ABBR tags using information from the wiki:

var eps = document.querySelectorAll('#eplist .eid, .episode');
for (i=eps.length;i--;) {
  var ep = eps[i];
  var type = ep.textContent.match(/([A-Z]+)?[0-9]+/);
  if (!type || type.length != 2 || !type[1]) continue;

  var abbr = document.createElement('abbr');
  switch (type[1]) {
    case "S": abbr.title = "Special"; break;
    case "C": abbr.title = "Credits/Opening (Op)/Ending (Ed)"; break;
    case "T": abbr.title = "Trailer/Promo/Ad"; break;
    case "P": abbr.title = "Parody/Fandub"; break;
    case "O": abbr.title = "Other"; break;
    case "OP": abbr.title = "Opening (Op)"; break;
    case "ED": abbr.title = "Ending (Ed)"; break;
    default: alert("Unrecognized episode type: " + type[1] + "\nUpdate the Greasemonkey Script"); continue;
  }
  abbr.textContent = type[1];

  var textnodeparent = ep;
  while (textnodeparent.childElementCount) textnodeparent = textnodeparent.children[0];
  textnodeparent.insertBefore(abbr, textnodeparent.firstChild);

  var textnode = textnodeparent.childNodes[1];
  textnode.deleteData(0, type[1].length);
}

While this is now WORKSFORME, it would be nice if this was integrated into anidb so it would continue to WORKSFORME even if I logged in elsewhere (and did not have the above greasemonkey script).
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2011-03-18 08:38 anidb_bug_reporter New Issue
2011-04-19 11:39 DerIdiot Status new => resolved
2011-04-19 11:39 DerIdiot Resolution open => fixed
2011-04-19 11:39 DerIdiot Assigned To => DerIdiot
2011-04-19 11:44 DerIdiot Project AniDB Website => HTML & PERL