Frustration with Javascript led me to JQuery

Frustration with Javascript led me to JQuery

Here is my setup.  This link is on Facebook when you are looking in a Group and then it's members.

  1. <a class="pam uiBoxLightblue uiMorePagerPrimary" href="/ajax/browser/list/group_members/?id=437856706251061&amp;gid=437856706251061&amp;edge=groups%3Amembers&amp;order=default&amp;view=grid&amp;start=96" rel="async">See More</a>

I am using automaton software (ahem...UBot) to perform some administrative type functions on several of the company's group pages.  Yes, I know they have a Click command but as we all know FB changes their coding up from time to time so I am trying to lessen the involvement of my time on correcting abnormalities.

The software does have a Run Javascript command and the following code snippet runs great on other websites but not in FB.

  1. var el = document.getElementsByClassName('pam uiBoxLightblue uiMorePagerPrimary');
    el[0].click();

I have tried a couple of other variations but they did not work either.  I wanted to show them here but I cannot put my hands on that code at the moment.

The goal is to click the "See More" text link.

Since this road block I have started down another path with JQuery.  At this point I have figured out that I can execute this command:

  1. $(function () {
            $("a").attr("onclick", "window.location = this.href");
    });

It then adds the following to the end of all of my <a> tags.
  1. ... onclick="window.location = this.href">See More</a>

I then execute this command:
  1. $( ".pam.uiBoxLightblue.uiMorePagerPrimary" ).click().on;

And away we go!  The link fires but with one exception.
It loads the full href from the correct link into the browser window and the screen blanks out leaving me with nothing.

Using a normal click to the link loads more data where the link sat.

I feel I am getting close at this point.  So I changed my onclick code to this:
  1. $(function () {
            $("a").attr("onclick", ".location = this.href");
    });

Repeated my steps but when I executed this command again

  1. $( ".pam.uiBoxLightblue.uiMorePagerPrimary" ).click().on;

Nothing happens.

I feel I am a gnats hair away from nailing this down.

Sorry for the long post.

Does anyone have any thoughts?

Mucho thanks!

Hal