MediaWiki:Timeless.js: Difference between revisions
From Fintech Lab Wiki
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
/* Add a target=_blank to all social links in footer */ | /* Add a target=_blank to all social links in footer */ | ||
const socialLinks = document.querySelectorAll('.footer-icons a') | const socialLinks = document.querySelectorAll('.footer-icons a') | ||
socialLinks. | for (var i = 0; i < socialLinks.length; i++) { | ||
socialLinks[i].setAttribute('target', "_blank") | |||
} | } |
Revision as of 16:03, 1 June 2022
/* All JavaScript here will be loaded for users of the Timeless skin */ const bocconiLogo = document.getElementById('p-banner'); bocconiLogo.setAttribute('href', "https://www.unibocconi.it"); bocconiLogo.setAttribute('target', "_blank"); /* Add a target=_blank to all social links in footer */ const socialLinks = document.querySelectorAll('.footer-icons a') for (var i = 0; i < socialLinks.length; i++) { socialLinks[i].setAttribute('target', "_blank") }