PageSourceSearch

https://www.atspace.com/wp-content/plugins/rchr-one-click-registration/media/js/gplus-login-button.js

js atspace.com collected 2026-09-24 09:13:05 UTC 3,053 bytes, 50 lines download raw bytes

1jQuery(document).ready(function() {
2        window.rchrGPlusSigninCallback = function(response) {
3                if(response.access_token && response.status.signed_in) {
4                        var $buttons = jQuery('.rchr-gplus-login-button').prop('disabled', true).addClass('rchr-login-button-loading');
5                        var $form = jQuery('<form method="POST" action="'+GPlusAppData.authUrl+'">'+
6                                              '<input type="hidden" name="rchr_social_network_access_token" value="'+response.access_token+'">'+
7                                              '<input type="hidden" name="rchr_social_network_type" value="gplus">'+
8                                              '<input type="hidden" name="action" value="rchr_one_click_registration">'+
9                                              '<input type="hidden" name="step" value="registerfreeclientsocial">'+
10                                      '</form>');
11                        $form.appendTo('body');
12                        jQuery.ajax({
13                                url: $form.attr('action'),
14                                dataType: 'html',
15                                type: $form.attr('method'),
16                                data: $form.serialize(),
17                                success: function(json) {
18                                        try {
19                                                json = JSON.parse(json);
20                                                if(json.error) {
21                                                        jQuery.notify.showError(json.msg)
22                                                } else {
23                                                        jQuery.notify.showSuccess(json.msg);
24                                                        window.location.href = json.redirect;
25                                                }
26                                        } catch(e) {
27                                                jQuery.notify.showError('Network Error');
28                                        }
29                                },
30                                complete: function() { $buttons.removeAttr('disabled').removeClass('rchr-login-button-loading') }
31                        });
32                        $form.remove();
33                }
34        }
35
36        jQuery('.rchr-gplus-login-button').on('click', function(e) {
37                e.preventDefault();
38                try {
39                        gapi.auth.signIn({
40                                clientid: GPlusAppData.clientId,
41                                cookiepolicy : 'single_host_origin',
42                                callback : 'rchrGPlusSigninCallback',
43                                scope: 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
44                                prompt: 'select_account'
45                        })
46                } catch (err){
47                        jQuery.notify.showError(err)
48                }
49        })
50})

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.