MediaWiki:Common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// Google Fonts
mw.loader.load( 'https://fonts.googleapis.com/css?family=Crimson+Text:400,400i,700', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Cinzel:400,700,900&subset=latin-ext', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Montserrat:200,400,600,900', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Quicksand', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Tangerine', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Lato:300,400', 'text/css' );
mw.loader.load( 'https://fonts.googleapis.com/css?family=Cormorant+Garamond', 'text/css' );
$(document).ready(function(){
$('div.bnw-resources-buttons .bnw-resources-button:first-child').addClass('active');
$('div.bnw-resources .bnw-resource-item:first-child').addClass('show');
$('.bnw-resources-button').click(function(){
$(this).addClass('active');
$(this).siblings('.bnw-resources-button').removeClass('active');
});
$('#bnw-resources-button-1').click(function(){
$('#bnw-resource-item-1').addClass('show');
$('#bnw-resource-item-1').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-2').click(function(){
$('#bnw-resource-item-2').addClass('show');
$('#bnw-resource-item-2').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-3').click(function(){
$('#bnw-resource-item-3').addClass('show');
$('#bnw-resource-item-3').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-4').click(function(){
$('#bnw-resource-item-4').addClass('show');
$('#bnw-resource-item-4').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-5').click(function(){
$('#bnw-resource-item-5').addClass('show');
$('#bnw-resource-item-5').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-6').click(function(){
$('#bnw-resource-item-6').addClass('show');
$('#bnw-resource-item-6').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-7').click(function(){
$('#bnw-resource-item-7').addClass('show');
$('#bnw-resource-item-7').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-8').click(function(){
$('#bnw-resource-item-8').addClass('show');
$('#bnw-resource-item-8').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-9').click(function(){
$('#bnw-resource-item-9').addClass('show');
$('#bnw-resource-item-9').siblings('.bnw-resource-item').removeClass('show');
});
$('#bnw-resources-button-10').click(function(){
$('#bnw-resource-item-10').addClass('show');
$('#bnw-resource-item-10').siblings('.bnw-resource-item').removeClass('show');
});
});
$(document).ready(function(){
$('#headingOne').append('<a class="collapsed" data-toggle="collapse" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> Derge Version </a>');
$('#headingTwo').append('<a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Narthang Version </a>');
$('#headingThree').append('<a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> Chone Version </a>');
$('#headingFour').append('<a class="collapsed" data-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour"> Pe Durma Version </a>');
$('#headingFive').append('<a class="collapsed" data-toggle="collapse" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive"> Ser Drima Version </a>');
});
$(document).ready(function(){
$(".pop-off, .pop-off-img img").hover(function(){
$(this).toggleClass("depth-1 depth-5");
});
});
$(document).ready(function(){
$(".image-1").hover(function(){
$("#description-1").toggleClass("hide show");
});
$(".image-2").hover(function(){
$("#description-2").toggleClass("hide show");
});
$(".image-3").hover(function(){
$("#description-3").toggleClass("hide show");
});
$(".image-4").hover(function(){
$("#description-4").toggleClass("hide show");
});
$(".image-5").hover(function(){
$("#description-5").toggleClass("hide show");
});
$(".image-6").hover(function(){
$("#description-6").toggleClass("hide show");
});
$(".image-7").hover(function(){
$("#description-7").toggleClass("hide show");
});
$(".image-8").hover(function(){
$("#description-8").toggleClass("hide show");
});
$(".image-9").hover(function(){
$("#description-9").toggleClass("hide show");
});
$(".image-10").hover(function(){
$("#description-10").toggleClass("hide show");
});
$(".image-11").hover(function(){
$("#description-11").toggleClass("hide show");
});
});
$(document).ready(function(){
$(".animated-caret a").hover(function(){
$(this).children('#fadeInCaret').addClass('animated fadeInLeft').toggleClass('visible');
});
});
// To change the site's favicon:
function change_favicon(img) {
var favicon = document.querySelector('link[rel="shortcut icon"]');
if (!favicon) {
favicon = document.createElement('link');
favicon.setAttribute('rel', 'shortcut icon');
var head = document.querySelector('head');
head.appendChild(favicon);
}
favicon.setAttribute('type', 'image/png');
favicon.setAttribute('href', img);
}
change_favicon('/images-budnat/6/6b/Tsadra_Logo_Favicon_-_Jeremi.png');
// TESTS
/*
$(document).ready(function(){
OO.ui.alert( 'Something larger happened!', { size: 'large' } );
});
*/