Massgeneric script won't work anymore. What am I doing wrong

All your questions about AniDB belong in here.
No download support!

Moderator: AniDB

Locked
cbp
Posts: 2
Joined: Wed Oct 11, 2006 3:05 am

Massgeneric script won't work anymore. What am I doing wrong

Post by cbp »

I am trying to add Urusei Yatsura (195 eps) to my list but the script won't select any of the generic files.

It used to work last time I used it (a few months ago) but now it doesn't work anymore. I tried in both IE and FF.

What am I doing wrong?

My way of doing it following the wiki link http://wiki.anidb.info/w/Scripts:Massgeneric:
Using FF:
1. I have the javascript in the url of the bookmark.
2. I open the anime page (i.e. Urusei Yatsura) and expand all entries.
3. I click on the bookmark (even tried drag and drop into address bar), the popup apears, I choose the number to select, press OK... Nothing happens
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

The scripts that generate each HTML page have been fiddled with a lot the past month, breaking the styling and user scripts such as this. On the plus side, if someone wants to rewrite it, could do it in a lot less code now.

Rar

Edit:

Okay, to show it's easy, quick replacement (only works in real browsers). Not entirely correct, but as the anime page is in a half-finished limbo at the moment it's pointless fiddling.

Code: Select all

tickboxes = function ()
{
  try
  {
    var xp = "//table[@class='filelist']//tr[contains(@class, 'genr')]/td[@class='check']/input";
    var result = document.evaluate(xp, document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
    for (var node = result.iterateNext(); node; node = result.iterateNext())
    {
      node.checked = true;
    }
  }
  catch (e)
  {
    alert("Script threw: "+e);
  }
}
In one-line abomination form:

javascript:(function(){try{var x="//table[@class='filelist']//tr[contains(@class,'genr')]/td[@class='check']/input",r=document.evaluate(x,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),n;while(n=r.iterateNext())n.checked=true}catch(e){alert("Script threw: "+e)}})()
Locked