« MediaWiki:Common.js » : différence entre les versions

De Mouvement Arbre-Évolution
Aller à :navigation, rechercher
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 13 : Ligne 13 :
   console.log(href2);
   console.log(href2);
   window.location= href2;
   window.location= href2;
})
});


/** Ouverture de pages par js **/
/** Ouverture de pages par js **/

Version du 17 mars 2025 à 10:05

/* Tout JavaScript présent ici sera exécuté par tous les utilisateurs à chaque chargement de page. */
importScript('MediaWiki:DataTables.js');
importScript('MediaWiki:Carrousel.js');
importScript('MediaWiki:CarboneRiverain.js');

$(document).ready(function () {

/** Redirection des pancartes **/

$('span#RedirectionPancarte a')[0].click(function (event) {
  event.preventDefault();
  var href2 = $(this).attr('href');
  console.log(href2);
  window.location= href2;
});

/** Ouverture de pages par js **/

$('.fusa-cr').click(function() {
    var URL = "https://carboneriverain.org/fusa-cr/";
    window.open(URL,'_blank','',''); 
});

$('.versPartenaire').click(function() {
    var URL = $(this).attr("title");
    window.open(URL,'_self','',''); 
});

$('.versExtérieur').click(function() {
    var URL = $(this).attr("href");
    window.open(URL,'_blank','',''); 
});

$(".compteur").each(function () {
  $(this)
    .prop("Counter", 0)
    .animate(
      {
        Counter: $(this).text(),
      },
      {
        duration: 4000,
        easing: "swing",
        step: function (now) {
          now = Number(Math.ceil(now)).toLocaleString('en');
                                $(this).text(now);
        },
      }
    );
  });
});

$(document).ready(function () {
var url = window.location;
console.log (url);
if (url === "https://arbre-evolution.org/index.php/Programmes#carbone") {
console.log ('OK');
$('#ongletsProgrammes #carbone-tab').tab('show');
}
} );

254-7, avenue de Gaspé Ouest
Saint-Jean-Port-Joli
G0R 3G0

6233, avenue Papineau
Montréal
H2G 2X1

© 2024 Arbre-Evolution.org Tous droits réservés
Graphisme : Martin Lamothe
Infrastructure wiki : Procédurable

« Pour la suite du monde », Pierre Perreault, 1963.