1(function ($) { 2 $(function () { 3 if (document.body.classList.contains('unknownUserAge')) { 4 var ageRestrictedContents = document.getElementsByClassName('ageRestrictedContent'); 5 if (ageRestrictedContents.length > 0) { 6 var $userAgeVerifier = $(userAgeVerifierLocalization.userAgeVerifierHtmlString); 7 for (var i = 0, len = ageRestrictedContents.length; i < len; i++) { 8 $userAgeVerifier.insertBefore(ageRestrictedContents[i]); 9 } 10 } 11 } 12 13 $('.noButton').on('click', function () { 14 15 document.body.classList.replace('unknownUserAge', 'underAgeUser'); 16 17 var referrerUrl = document.referrer; 18 if (referrerUrl !== '') { 19 var referrerHost = referrerUrl.match(/:\/\/(.[^/]+)/)[1]; 20 } 21 22 if (referrerHost === location.host) { 23 if (window.history.length > 1) { 24 window.history.back(); 25 } else { 26 // it was opened in a new tab / page 27 window.location.replace(referrerUrl); 28 } 29 } 30 31 if (referrerHost !== location.host) { 32 window.location.replace('/'); 33 } 34 }); 35 36 $('.yesButton').on('click', function () { 37 document.body.classList.replace('unknownUserAge', 'adultUser'); 38 $('.userAgeVerifierContainer').remove(); 39 }); 40 }); 41})(jQuery);
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.