mirror of
https://github.com/hacks-guide/Guide_3DS.git
synced 2025-08-28 10:49:58 +02:00
use js to open external links in new tab
This commit is contained in:
@@ -4,6 +4,15 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// external links should open in a new tab
|
||||
var host = location.hostname
|
||||
var allLinks = document.querySelectorAll('a')
|
||||
for (var i = 0; i < allLinks.length; ++i) {
|
||||
if (allLinks[i].hostname !== host && allLinks[i].hostname !== '') {
|
||||
allLinks[i].target = '_blank'
|
||||
}
|
||||
}
|
||||
|
||||
// Sticky footer
|
||||
var bumpIt = function() {
|
||||
$('body').css('margin-bottom', $('.page__footer').outerHeight(true));
|
||||
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user