MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Created page with "→Any JavaScript here will be loaded for all users on every page load.: document.addEventListener("DOMContentLoaded", function () { const links = document.querySelectorAll("#p-Tools a"); links.forEach(function (link) { if (link.href.includes("aia.dslab.ece.ntua.gr")) { link.setAttribute("target", "_blank"); link.setAttribute("rel", "noopener noreferrer"); } }); });" |
(No difference)
|
Revision as of 07:08, 14 April 2025
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded", function () {
const links = document.querySelectorAll("#p-Tools a");
links.forEach(function (link) {
if (link.href.includes("aia.dslab.ece.ntua.gr")) {
link.setAttribute("target", "_blank");
link.setAttribute("rel", "noopener noreferrer");
}
});
});