PageSourceSearch

https://oaka.alsace/wp-content/themes/Divi-Child-Oaka/modules/oaka…/oaka-hook-modules-advertising-script.js

js oaka.alsace collected 2026-10-07 12:56:41 UTC 2,007 bytes, 62 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3    if ($('body.wp-admin').length == 0) {
4
5        /** VARIABLES */
6        var shortcode = "[oaka_banner_display id=420]"; //A terme mettre en get_option ou en localize_script
7        var curl = window.location.protocol + '//' + window.location.hostname + '/wp-admin/admin-ajax.php';
8
9        //*****************DEBUT AJAX DINSERTION DU SHORTCODE AU 6E H2
10        $.ajax({
11            type: 'POST',
12            url: curl,
13            data: {
14                action: 'execute_banner_shortcode',
15                shortcode: shortcode
16            },
17            success: function(response) {
18                if (response) {
19                    $('h2').eq(5).before(response);
20                }
21            },
22            error: function(error) {
23                console.log("Erreur AJAX :", error);
24            }
25        });
26        //FIN AJAX DINSERTION DU SHORTCODE AU 6E H2*******************
27
28
29
30        //*************DEBUT AJAX INCREMENTATION AU CLIC DUNE BANNIERE
31        $('body').on('click', '.clickable-banner', function(event) {
32
33            event.preventDefault();
34
35            var bannerId = $(this).parent().attr('id');
36
37            $.ajax({
38                url : curl,
39                method : 'POST',
40                data : {
41                    action : 'increment_clicked_banner_function',
42                    id_banner : bannerId
43                },
44                success : function( data ) {
45                    if($('.clickable-banner').attr('target') == '_blank') {
46                        window.open($('.clickable-banner').attr('href'));
47                    } else {
48                        window.location.href = $('.clickable-banner').attr('href');
49                    }
50
51                },
52                error : function( data ) {
53                    console.log( 'Erreur AJAX au clic de la bannière' );
54                }
55            });
56        
57        });
58        //FIN AJAX INCREMENTATION AU CLIC DUNE BANNIERE***************
59
60    }
61
62});

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.