PageSourceSearch

https://rdv-histoire.com/modules/supersoniks/ssks_socialwall/js/ssks_socialwall_moderation.js?v=1.x

js rdv-histoire.com collected 2026-09-24 18:49:25 UTC 1,787 bytes, 66 lines download raw bytes

1(function($) {
2  $("body").on("click", ".sw-moderation-button", function() {
3    var sectionId = $(this)
4      .parent()
5      .parent()
6      .parent()
7      .attr("id");
8    sectionId = sectionId.substring(11);
9
10    var data = {
11      reseauSocial: $(this).data("reseau"),
12      postId: $(this).data("post-id"),
13      timestamp: $(this).data("timestamp"),
14      titre: encodeURI($(this).data("titre")),
15      contenu: encodeURI($(this).data("contenu")),
16      lien: $(this).data("lien"),
17      photo: $(this).data("photo"),
18      igMediaRoute: $(this).data("ig-media-route"),
19      sw_id: sectionId,
20    };
21
22    $(this).data("statut", !$(this).data("statut"));
23
24    if ($(this).data("statut")) {
25      addPostToDatabase(data);
26      $(this).text("Publié");
27      $(this).attr("data-publication", "Publié");
28    } else {
29      deletePostFromDatabase(data);
30      $(this).text("Non publié");
31      $(this).attr("data-publication", "Non publié");
32    }
33  });
34
35  function addPostToDatabase(data) {
36    $.ajax({
37      type: "POST",
38      url: "/supersoniks/ssks_socialwall/moderation",
39      success: function(response) {
40        console.log(response);
41      },
42      error: function(e) {
43        console.error("Erreur Moderation POST : ", e);
44      },
45      contentType: "application/x-www-form-urlencoded",
46      data: data,
47      dataType: "json",
48    });
49  }
50
51  function deletePostFromDatabase(data) {
52    $.ajax({
53      type: "DELETE",
54      url: "/supersoniks/ssks_socialwall/moderation",
55      success: function(response) {
56        console.log(response);
57      },
58      error: function(e) {
59        console.error("Erreur Moderation DELETE : ", e);
60      },
61      contentType: "application/x-www-form-urlencoded",
62      data: data,
63      dataType: "json",
64    });
65  }
66})(jQuery);

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.