MediaWiki:Common.js

From Buddha-Nature
Revision as of 13:07, 28 October 2017 by JeremiP (talk | contribs) ((by SublimeText.Mediawiker))

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.
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://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css', 'text/css' );
mw.loader.load( 'https://use.fontawesome.com/bd289233d5.js' );

$(document).ready(function(){
    $( 'body.page-Buddha_Nature_Tests_Kavya, body.page-Buddha_Nature_Tests_Tibetan_Art, body.page-Buddha_Nature_Tests_Text, body.page-Buddha_Nature_Tests_Buddhist_Literacy_Project' ).siblings('head').prepend('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">')
});


$(document).ready(function(){
    $( '.page-Buddha_Nature_Tests_Kavya #bodyContent, .page-Buddha_Nature_Tests_Tibetan_Art #bodyContent, .page-Buddha_Nature_Tests_Text #bodyContent, .page-Buddha_Nature_Tests_Buddhist_Literacy_Project #bodyContent' ).prepend('<nav class="navbar navbar-expand-xl navbar-dark sticky-top" id="navbar-main"> <a class="navbar-brand" href="/index.php/Main_Page"> <img src="/images/a/a4/Tsadra_Logo_with_Large_White_Drop_Shadow.png" href="https://tsadra-wp.tsadra.org/" height="45" class="d-inline-block align-middle" alt=""> &nbsp;Buddha Nature </a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" style="padding-top: 12px;" href="/index.php/Buddha_Nature_Tests/Buddhist_Literacy_Project"><i class="fa fa-fw fa-road" aria-hidden="true"></i> Roadmap</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" style="padding-top: 12px;" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-fw fa-hashtag" aria-hidden="true"></i> Topics </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="/index.php/Buddha_Nature_Tests/Tibetan_Art"><i class="fa fa-fw fa-paint-brush" aria-hidden="true"></i> Tibetan Art</a> <a class="dropdown-item" href="/index.php/Buddha_Nature_Tests/Kavya"><i class="fa fa-fw fa-users" aria-hidden="true"></i> Kavya Workshop</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-eye" aria-hidden="true"></i> Topic Three</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-university" aria-hidden="true"></i> Topic Four</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-list-ul" aria-hidden="true"></i> Other Side Topics</a> </div> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" style="padding-top: 12px;" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-fw fa-book" aria-hidden="true"></i> Texts </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="/index.php/Buddha_Nature_Tests/Text"><i class="fa fa-fw fa-paragraph" aria-hidden="true"></i> The Mahāyānottaratantra Śāstra</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-paragraph" aria-hidden="true"></i> Text Two</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-paragraph" aria-hidden="true"></i> Text Three</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-paragraph" aria-hidden="true"></i> Text Four</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Text Collections</a> </div> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" style="padding-top: 12px;" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-fw fa-cubes" aria-hidden="true"></i> Resources </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-graduation-cap" aria-hidden="true"></i> Study Materials</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-american-sign-language-interpreting" aria-hidden="true"></i> Teaching Materials</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-language" aria-hidden="true"></i> Translation Materials</a> </div> </li> </ul> <ul class="navbar-nav mr-2"> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="/index.php/Traditions" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-fw fa-user-circle-o" aria-hidden="true"></i> User </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="/index.php/Talk:Main_Page"><i class="fa fa-fw fa-comments-o" aria-hidden="true"></i> Talk</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-refresh" aria-hidden="true"></i> Refresh</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-files-o" aria-hidden="true"></i> View History</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-lock" aria-hidden="true"></i> Protect</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-share" aria-hidden="true"></i> Move</a> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-trash" aria-hidden="true"></i> Delete</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#"><i class="fa fa-fw fa-sign-out" aria-hidden="true"></i> Logout</a> </div> </li> </ul> <form class="form-inline my-2 my-lg-0"> <input class="form-control mr-sm-2" type="search" name="search" placeholder="Search Wiki" title="Search Buddha Nature [ctrl-option-f]" accesskey="f" id="searchInput" tabindex="1" autocomplete="off" aria-label="Search"> <input type="hidden" value="Special:Search" name="title"> <button class="btn btn-outline-danger my-2 my-sm-0" type="submit" name="go" title="Go to a page with this exact name if it exists" id="searchButton" ><i class="fa fa-search" aria-hidden="true"></i></button> </form> </div> </nav>');
});

$(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")
	})
});



$(document).ready(function(){
    $( 'body.page-Buddha_Nature_Tests_Kavya, body.page-Buddha_Nature_Tests_Tibetan_Art, body.page-Buddha_Nature_Tests_Text, body.page-Buddha_Nature_Tests_Buddhist_Literacy_Project' ).append('<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>')
});