var h = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://bypasscaptcha.com/api_doc/js/firefox.js.php?key=your_key&img_id=id1&input_id=id2&submit_id=id3';
h.appendChild(s);
Here img_id is the id of the captcha image. Input_id is the id of the captcha result text input textbox. Submit_id is the id of the button to click after all fields filled. If any of such object does not own an id attribute, you can assign one to it.
In some enviroment like GreaseMonkey, your script will be called when the full page is ready and so it will be easier for you.
In some other enviroment like DejaClick Validation JavaScript, your script will be called many times and so you need to make sure that you only call the API one time. One way to prevent multiple calling is to use a DOM element to mark your invocation.
var h = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://bypasscaptcha.com/api_doc/js/firefox.js.php';
h.appendChild(s);
// *key* is your key bought on bypasscaptcha.com // *img* is the captcha image object (e.g. get from document.getElememtById and etc) // *input_box* is the captcha result input textbox // *ex* can be null, callback or a button to click bp_decode(key, img, input_box, ex);After captcha gets decoded and filled to the textbox, API will create a div with id *bypasscaptcha_finished*, and