Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/recaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var http = require('http'),
*/

var API_HOST = 'www.google.com',
API_END_POINT = '/recaptcha/api/verify',
API_END_POINT = '/recaptcha/api.js',
SCRIPT_SRC = API_HOST + '/recaptcha/api/challenge',
NOSCRIPT_SRC = API_HOST + '/recaptcha/api/noscript';

Expand Down Expand Up @@ -73,7 +73,8 @@ Recaptcha.prototype.toHTML = function() {
var script_src = (this.is_secure ? "https://" : "http://") + SCRIPT_SRC + '?' + query_string;
var noscript_src = (this.is_secure ? "https://" : "http://") + NOSCRIPT_SRC + '?' + query_string;

return '<script type="text/javascript" src="' + script_src + '"></script>' +
return '<div class="g-recaptcha" data-sitekey="' + this.public_key + '"></div>' +
'<script type="text/javascript" src="' + script_src + '"></script>' +
'<noscript><iframe src="' + noscript_src + '" height="300" width="500" ' +
'frameborder="0"></iframe><br><textarea name="recaptcha_challenge_field" ' +
'rows="3" cols="40"></textarea><input type="hidden" ' +
Expand Down