PageSourceSearch

https://sammilana.vsna.org/wp-content/plugins/woo-custom-my-accoun…-custom-my-account-page-public.js?ver=1.6.0

js vsna.org collected 2026-10-02 12:36:16 UTC 2,271 bytes, 73 lines download raw bytes

1jQuery(document).ready(function($) {
2    "use strict";
3
4    function preload_popup() {
5        $('body').append( '<div id="wcmp-avatar-form-overlay" class="loading"></div>' );
6    }
7
8    function center_popup() {
9        var p = $( '#wcmp-avatar-form');
10
11        if( ! p.length ) {
12            return false;
13        }
14
15        var window_w = $(window).width(),
16            window_h = $(window).height(),
17            o_width  = p.data('width') || 500,  // Default to 500px if data attribute missing
18            o_height = p.data('height') || 280, // Default to 280px if data attribute missing
19            width    = ( ( window_w - 60 ) > o_width ) ? o_width : ( window_w - 60 ),
20            height   = ( ( window_h - 120 ) > o_height ) ? o_height : ( window_h - 120 );
21
22        p.css({
23            'left'   : (( window_w/2 ) - ( width/2 )),
24            'top'    : (( window_h/2 ) - ( height/2 )),
25            'width'  : width + 'px',
26            'height' : height + 'px'
27        });
28    }
29
30    function close_popup() {
31        $( '#wcmp-avatar-form, #wcmp-avatar-form-overlay' ).fadeOut('slow', function(){
32            $(this).remove();
33        });
34    }
35
36    $(window).on( 'resize', center_popup );
37
38    $('#load-avatar').click( function (ev) {
39        
40        ev.preventDefault();
41        preload_popup();
42
43        $.ajax({
44            url: wcmp.ajaxurl.toString().replace( '%%endpoint%%', wcmp.actionPrint ),
45            data: {},
46            dataType: 'html',
47            success: function( res ) {
48
49                $('body').append( res ).find('#wcmp-avatar-form-overlay').removeClass('loading');
50                center_popup();
51
52                $('#wcmp-avatar-form-overlay, i.close-form').click(function(){
53                    close_popup();
54                })
55            }
56        })
57        
58    });
59
60    $(document).on( "click", ".group-opener", function(ev){
61        ev.preventDefault();
62
63        var container = $(this).closest('li');
64
65        if( container.hasClass( 'is-tab' ) && $(window).width() >= 480 ) {
66            container.toggleClass( 'is-hover' );
67            return;
68        }
69
70        $(this).find('i.opener').toggleClass( 'fa-chevron-down' ).toggleClass( 'fa-chevron-up' );
71        $(this).next('.myaccount-submenu').slideToggle();
72    });
73});

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.