CoreFiles by mySites.guru
recaptcha.js35 lines, 968 bytes, from Joomla_3.10.3-Stable-Full_Package.zip
Raw History Compare with 3.10.2
md5
e97e75537f617367ac1fbb1e1f6d8524
sha1
45f87ce9c28de1ccf03ed820cd5565b883015319
sha256
27c602dd1fec8300808d658ec55c8f854348a2851533c9c16ffbb693d95ecb64
/**
 * @package		Joomla.JavaScript
 * @copyright	(C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
window.JoomlaInitReCaptcha2 = function() {
	'use strict';

	var items = document.getElementsByClassName('g-recaptcha'),
	    item,
	    option_keys = ['sitekey', 'theme', 'size', 'tabindex', 'callback', 'expired-callback', 'error-callback'],
	    options = {},
	    option_key_fq
	;

	for (var i = 0, l = items.length; i < l; i++) {
		item = items[i];
		if (item.dataset) {
			options = item.dataset;
		} else {
			for (var j = 0; j < option_keys.length; j++) {
				option_key_fq = ('data-' + option_keys[j]);
				if (item.hasAttribute(option_key_fq)) {
					options[option_keys[j]] = item.getAttribute(option_key_fq);
				}
			}
		}

		// Set the widget id of the recaptcha item
		item.setAttribute(
			'data-recaptcha-widget-id',
			grecaptcha.render(item, options)
		);
	}
};

The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.