1/* global $ */ 2 3// docs for rendering recaptcha widgets: 4// https://developers.google.com/recaptcha/docs/display 5;(function(){ 6 'use strict'; 7 8 // Scale recaptcha widget to fit within the form container. 9 function scaleCaptcha(el) { 10 var reCaptchaWidth = 304; 11 var formWidth = $(el).closest('form').width(); 12 13 if(reCaptchaWidth > formWidth) { 14 var captchaScale = formWidth / reCaptchaWidth; 15 $(el).closest('.recaptcha-wrap').css({ 16 'transform':'scale('+captchaScale+')' 17 }); 18 } 19 } 20 21 function render(id){ 22 var el = document.getElementById(id); 23 var sitekey = el.getAttribute('data-sitekey'); 24 window.grecaptcha.render(el, {sitekey: sitekey}); 25 26 scaleCaptcha(el); 27 } 28 29 function renderQueue() { 30 while(window.formWidgetRecaptchaQueue.length) { 31 render(window.formWidgetRecaptchaQueue.pop()); 32 } 33 } 34 35 window.recaptchacb = window.recaptchacb || renderQueue; 36 if(window.grecaptcha) { 37 renderQueue(); 38 } 39 40})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.