Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- (function() {
- function findCaptcha() {
- return document.querySelector('.g-recaptcha') || document.getElementById('g-recaptcha');
- }
- function completeCaptch(intervalID) {
- intervalID = setInterval(function() {
- if (findCaptcha() != null) {
- findCaptcha()
- .remove();
- clearInterval(intervalID);
- }
- }, 200);
- }
- var loadedID = null;
- if (location.hash === '#checkout' || location.pathname === '/checkout') {
- completeCaptch(loadedID);
- }
- var stateID = null;
- window.addEventListener('popstate', function(event) {
- stateID = null;
- clearInterval(stateID);
- if (location.hash === '#checkout' || location.pathname === '/checkout') {
- completeCaptch(stateID);
- }
- }, false);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement