Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6653311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:15:13+00:00 2026-05-26T01:15:13+00:00

Would appreciate your help with something. I have an autoclick Greasemonkey for Firefox script

  • 0

Would appreciate your help with something.

I have an autoclick Greasemonkey for Firefox script that autoclicks a link on the site I work at when a job comes in. The script is this:

var BEEP_URL = 'file:///C:/Users/Home/beep.html'; //local url to beep.html for     example 'file:///C:/deploy/html/beep.html'
var REFRESH_DELAY = 8; // in seconds
var CLICK_DELAY = 0; // in seconds
var LENGTH_MIN = 15 // min length of audio in minutes
var LENGTH_MAX = 600 // max length of audio in minutes 

function init() {
var refreshTimer = window.setTimeout(function() {
    location.reload();
}, REFRESH_DELAY * 1000);

if(!$('a:contains(Read now)').length){
    href = false;
    $('a:contains(Start)').each(function() {
        time = parseInt($(this).parents('td').nextAll('td').contents('small').html());
        if (!href && time >= LENGTH_MIN && time <= LENGTH_MAX) {
            GM_openInTab(BEEP_URL); 
            href = this.href;
            clearTimeout(refreshTimer);
            window.setTimeout(function() {
                top.location.href = href;
            }, CLICK_DELAY * 1000);
        }
    })
}
}

if (window.addEventListener) {
window.addEventListener('load', init, false);
} else {
document.attachEvent('onload', init);
}

The important bits of the page on the site I work at looks like this:

<tr>
<td><a title = 'Job'>Job</a></td>

<td>4</td>

<td><i>Group</i></td>

<td>3/10/2011</td>

<td><a href=http://www.site.com>Start</a></td>

<td><a href='/sound/job_sound.mp3' ><img border=0 src=/images/audio.gif title='79 min uploaded 3/10/2011 7:39:31 AM' ></a><br /><small>80 min <br />7:39:31 AM</small></TD>

<td>&nbsp;</td>
</tr>

As you can see, the script refreshes the page and if a job comes in with the link ‘Start’ and the right amount of minutes for the LENGTH_MIN and LENGTH_MAX variables in the small tag in the table (second last td cell), then the script will click the ‘Start’ link.

Recently, however, the site has changed the structure of the page slightly so that it now looks like this:

<tr>
<td><a title = 'Job'>Job</a></td>

<td>4</td>

<td><i>Group</i></td>

<td>3/10/2011</td>

<td><a href=http://www.site.com>Start</a></td>

<td><small>Audio 1: </small><a href='/sound/job_sound.mp3' ><img border=0 src=/images/audio.gif title='Audio 1: 39 min uploaded 10/4/2011 7:13:06 AM' alt='Audio 1 39 min uploaded 10/4/2011 7:13:06 AM'></a><small>40 min 7:13:06 AM</small><BR><small>Audio 2: </small><a href='/audio/job_sound2.mp3' ><img border=0 src=/images/audio.gif title='Audio 2: 40 min uploaded 10/4/2011 7:15:19 AM' alt='Audio 2 40 min uploaded 10/4/2011 7:15:19 AM'></a><small>41 min 7:15:19 AM</small><br>&nbsp;<br></TD>

<td>&nbsp;</td>
</tr>

As you can see, the bit that the LENGTH_MIN and LENGTH_MAX variables is called by has been changed (at least, that’s where I think the problem is) and now the script doesn’t work anymore. Two or more audio files are shown now on the page and the time is inserted in the small tag. Is there anything you can see there that I can change in the script to get it to work with this page? It seems like it gets called by data in the page wrapped in small tags, and the site has changed how that section of the table is laid out which is causing the script problems. I’m not sure what to tweak in the script to make it still click the ‘Start’ link.

Would really appreciate your help. Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:15:14+00:00Added an answer on May 26, 2026 at 1:15 am

    The minimal change to fix this might be to replace .contents('small') (which, as far as I can tell from the docs, probably doesn’t do what you think anyway) with .find('small').eq(1). This might not be a very robust solution (i.e. it might break again in the future if there are more changes to the document structure), but it’s hard to say what might be better without knowing more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would appreciate some help with something I working on and have not done
I'm new to regular expressions and would appreciate your help. I'm trying to put
I have an interesting problem and would appreciate your thoughts for the best solution.
I have a design issue that I would appreciate some input on. I would
I would appreciate your help in understanding a "Concurrency Example" from: http://forums.sun.com/thread.jspa?threadID=735386 public synchronized
Would really appreciate some help with this. I have an app which consists of
What, in your opinion (although I would highly appreciate articles / books on related
I would appreciate some guidance on modelling services and operations in WCF. I have
I would appreciate any help on this issue. Lets say I want to load
I would appreciate some help with an UPDATE statement. I want to update tblOrderHead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.