PageSourceSearch

https://green-way.com.ua/plugins/greenway/userextension/assets/javascript/socialNetworks3.js?ver=801

js green-way.com.ua collected 2026-09-24 17:48:59 UTC 5,773 bytes, 113 lines download raw bytes

1function snDataRetrieving(code, type) {
2    $(this).request('on' + type + 'DataRetrieving', {
3        data: {code: code},
4        success: function (data) {
5            if (data != ''){
6                if (data.X_OCTOBER_REDIRECT != undefined) {
7                    window.location.replace(data.X_OCTOBER_REDIRECT);
8                }
9                if (data['errors'] != undefined && !(type == "Facebook" && data['errors']['email_busy'] != undefined)) {
10                    if (data['errors']['email_restricted'] != undefined) {
11                        $('#registration_link').trigger('click');
12                    } else if (data['errors']['email_busy'] != undefined) {
13                        $('#badEmail_link').trigger('click');
14                    } else if (data['errors']['auth'] == 'user is blocked') {
15                        $('#authorization #loading_block .center').html('Account is blocked!');
16                    } else if (data['errors']['auth'] == 'user is not activated') {
17                        $('#auth_is_not_activated').css('display', 'block');
18                    }
19                } else {
20                    if (typeof data['result'] != 'undefined') {
21                        if (typeof data['result']['email'] != 'undefined') {
22                            $('#regmail').val(data['result']['email']);
23                            $('#emailPreset').val(1);
24                        } else {
25                            $('#regmail').val('');
26                            $('#regmail').addClass('ignore');
27                            $('#reg2mail').removeAttr('readonly');
28                            if (type == "Facebook") {
29                                $('#reg2_log').text(textEmailRegisteredFacebook);
30                            } else if (type == "Telegram") {
31                                $('#reg2_log').text(textEmailRegisteredTelegram);
32                            }
33                            $('#emailPreset').val(0);
34                        }
35                        $('#regpass').val(data['result']['password']);
36                        $('#regpass2').val(data['result']['password']);
37                        if (type == "Google") {
38                            $('#reg2google').val(data['result']['id']);
39                            $('#reg2fio').val(data['result']['name']);
40                            $('#regpicture').val(data['result']['picture']);
41                            $('#regpicture_link').attr("src", data['result']['picture']);
42                        } else if (type == "Facebook") {
43                            $('#reg2facebook').val(data['result']['id']);
44                            $('#reg2fio').val(data['result']['name']);
45                            $('#regpicture').val("https://graph.facebook.com/"+data['result']['id']+"/picture?type=large");
46                            $('#regpicture_link').attr("src", "https://graph.facebook.com/"+data['result']['id']+"/picture?type=large");
47                        } else if (type == "Telegram") {
48                            $('#reg2telegram').val(data['result']['id']);
49                            $('#reg2fio').val(data['result']['first_name']);
50                            $('#regpicture').val(data['result']['photo_url']);
51                            $('#regpicture_link').attr("src", data['result']['photo_url']);
52                        }
53                        $('#reg_accept_conditions').prop('checked', true);
54                        $('#registration2_link').trigger('click');
55                    }
56                }
57            } else {
58                //Error
59            }
60        },
61        error: function(data) {}
62    });
63}
64function resetHubUserCacheFromSocialNetworks() {
65    if (typeof resetHubUserCache == 'function') {
66        resetHubUserCache();
67    }
68}
69function snLinking(code, type) {
70    $(this).request('on' + type + 'Linking', {
71        data: {code: code},
72        success: function (data) {
73            if (data['result'] == 'success'){
74                $('#accountAttached').modal('show');
75                if (type == 'Telegram') {
76                    $('#user_data_form .authorization-social').addClass('-t');
77                    $('#user_data_form .authorization-social .telegram-widget').replaceWith('<div class="ulogin-button-telegram"></div>');
78                }
79                if (($('#personal-image-view').attr('src') == '/themes/greenway/assets/images/photo.jpg') && (typeof data[type.toLowerCase() + 'Id'] !== 'undefined')) {
80                    $(this).request('on' + type + 'LinkingPhoto', {
81                        data: {
82                            googleId: data[type.toLowerCase() + 'Id'],
83                            facebookId: data[type.toLowerCase() + 'Id'],
84                            telegramId: data[type.toLowerCase() + 'Id']
85                        },
86                        success: function (data) {
87                            if ((data['result'] == 'success') && (typeof data['path'] !== 'undefined')){
88                                $('#personal-image-view').attr('src', data['path']);
89                                resetHubUserCacheFromSocialNetworks();
90                            } else {
91                                console.log("Error");
92                            }
93                        },
94                        error: function(data) {}
95                    });
96                }
97            } else {
98                console.log("Error");
99            }
100        },
101        error: function(data) {}
102    });
103}
104function gup(url, name) {
105    name = name.replace(/[[]/,"\[").replace(/[]]/,"\]");
106    var regexS = "[\?&]"+name+"=([^&#]*)";
107    var regex = new RegExp(regexS);
108    var results = regex.exec(url);
109    if(results == null)
110        return "";
111    else
112        return results[1];
113}

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.