MediaWiki:Common.js
De Fab Labs Québec
Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
- Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
- Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
- Internet Explorer / Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
- Opera : appuyez sur Ctrl + F5.
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
var no_tree = document.querySelector(".__NOTREE__");
if (no_tree) {
subpage_tree = document.querySelector("#contentSub");
if (subpage_tree){
subpage_tree.style.display = "none"
}
}
$(function () {
console.log("allo");
//Make tabs linkable
var tabnav = document.getElementById('mw-vdj-tabnav');
if (tabnav){
// Javascript to enable link to tab
var url = document.location.toString();
if (url.match('#')) {
var tab = $('.nav-tabs a[href="#' + url.split('#')[1] + '"]');
tab.ready( function () {tab.click();});
}
// Change hash for page-reload
$('.nav-tabs a').on('click', function (e) {
window.location.hash = e.target.hash;
})
}
}());