The question is published on by Tutorial Guruji team.
I am trying to do this via the Web Console (using Firefox, but I am willing to change if necessary of course).
What I want to do is to basically click all the “plus” signs on a page at once. For an example see here: http://de.wikipedia.org/wiki/Kategorie:Volkswirtschaftslehre (excuse me for linking a german site, but the english wikipedia seems to be employing a different system now, and I need to do it on the German one…)
This is how far I have gotten: When I enter
var = document.getElementsByClassName("CategoryTreeToggle");
I get the variable test that includes all the elements of CategoryTreeToggle. However, apparently there is no onclick routine defined for those.
Can anybody please help me and tell me where to go from there?
Answer
MediaWiki uses jQuery, which makes this easy:
$( '.CategoryTreeToggle' ).click();
Or, if you only want to click those toggles that are not already expanded:
$( '.CategoryTreeToggle[title="ausklappen"]' ).click();
But wouldn’t it be easier to just use CatScan?