PageSourceSearch

https://www.mariefranceasia.com/wp-content/themes/reworldmedia/ass…ommon-utils-most-popular-video.js?ver=10777

js mariefranceasia.com collected 2026-09-24 10:14:05 UTC 2,532 bytes, 71 lines download raw bytes

1$(document).ready(function (){
2    initPlayerMostPopularVideo();
3    load_video();
4});
5
6function initPlayerMostPopularVideo() {
7    $(".thumb-video .second-article").on("click", function(){
8        $(".thumb-video .second-article.first").parents(".thumb-video").removeClass("hide");
9        $(".thumb-video .second-article.first").removeClass("first");
10        $(this).parents(".thumb-video").addClass('hide');
11        $(this).addClass('first');
12
13        // change href and title of the current video.
14        $(".main-article-title").text($(this).attr("title"));
15        $(".main-article-title").parents("a:first").attr("href", $(this).data("link"));
16
17        // get type and id of the current video
18        var type = $(this).data("type");
19        var video_id = $(this).data("video");
20
21        // reload video on player
22        playVideoOnPopularArticle("player_most_popular", type, video_id);
23        return false;
24    });
25
26    $(".thumb-video .second-article.first").click();
27}
28/**
29 * gather video details and play video on player
30 */
31function playVideoOnPopularArticle( block_id, type, video_id) {
32    param = {};
33    if (type == 'youtube') {
34        param = {
35            youtube_id: video_id
36        };
37        $("#"+block_id).attr("href", "api:"+video_id);
38    } else if (type == 'dailymotion') {
39        param = {
40            dailymotion_id: video_id,
41            url : site_config_js.SITE_SCHEME + '://dai.ly/'+video_id
42        };
43    }
44
45    var url_template = site_config_js.url_template;
46    var id_pub = site_config_js.id_pub;
47
48    $("#"+block_id).html("");
49    show_video(block_id, url_template, id_pub, type, "", true, param);
50
51    return false;
52}
53
54function load_video() {
55
56    $('.widget_most_popular_videos .row .col-xs-6 .img-title').unbind();
57    $('.widget_most_popular_videos .row .col-xs-6 .img-title').bind("click", function() {
58        var video_html = $(this).parents('.col-xs-6').find('.items-posts').html();
59        $('.widget_most_popular_videos .large-player').html('<div class="items-posts">'+video_html+'</div>');
60        $('.widget_most_popular_videos .row .col-xs-6').removeClass('hidden');
61        $(this).parents('.col-xs-6').addClass('hidden');
62    });
63
64    $("#blockRight .list-ms-item>aside").each(function(i,obj){
65        if($(obj).find('.textwidget>div').hasClass('widget_most_popular_videos')) {
66            var list_videos = $('.widget_most_popular_videos .row').children('.col-xs-6');
67            $(list_videos[0]).find('.img-title').click();
68            return false;
69        }
70    });
71}

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.