PageSourceSearch

https://skin.prismashop.fr/skin/frontend/prisma/default/js/connect.js

js prismashop.fr collected 2026-10-01 12:18:27 UTC 2,324 bytes, 72 lines download raw bytes

1var PRISMA_CONNECT;
2PRISMA_CONNECT = Class.create();
3PRISMA_CONNECT.prototype = Object.extend(new PRISMA_ABSTRACT(), {
4    initialize: function () {
5        /** */
6    },
7    run: function () {
8        this.listen();
9        this.onSignIn();
10    },
11    asyncLoadGoogleJs: function (u, c) {
12        var d = document, t = 'script';
13        var o = d.createElement(t);
14        var s = d.getElementsByTagName(t)[0];
15        o.src = u;
16        if (c) {
17            o.addEventListener('load', function (e) {
18                c(null, e);
19
20                console.log('yolo');
21
22            }, false);
23        }
24        s.parentNode.insertBefore(o, s);
25    },
26    asyncLoadFacebookJs: function(d, s, id,url) {
27        var js, fjs = d.getElementsByTagName(s)[0];
28        if (d.getElementById(id)) return;
29        js = d.createElement(s); js.id = id;
30        js.src = url;
31        fjs.parentNode.insertBefore(js, fjs);
32    },
33    listen: function () {
34        this.asyncLoadGoogleJs('https://apis.google.com/js/platform.js');
35        // this.asyncLoadFacebookJs(document, 'script', 'facebook-jssdk', '//connect.facebook.net/en_US/sdk.js');
36    },
37    onSignIn: function  ()
38    {
39        var _process = false;
40        jQuery("body").on("prisma_connect_sign_in", function( event, type, userData) {
41
42            if(_process){
43                return;
44            }
45
46            _process = true;
47
48            jQuery.ajax({
49                url: "/prisma_connect/index/register",
50                type: 'GET',
51                dataType: 'json',
52                data: {
53                    type : type,
54                    userData : userData
55                },
56                complete: function(response){
57                    _process = false;
58                    var jsonReponse = response.responseJSON;
59                    if(jsonReponse.error == 0){
60                        jQuery(userData.div).html(jsonReponse.success_message);
61                        var auth2 = gapi.auth2.getAuthInstance();
62                        auth2.signOut();
63                        window.setLocation(jsonReponse.redirect_url);
64                    }else{
65                       //console.log(jsonReponse.error);
66                    }
67                }
68            });
69        });
70
71    }
72});

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.